模态 Django 中的轮播

问题描述

您好,我正在尝试在我的模态中放置一个轮播。一切正常,直到我把它。有人可以告诉我出了什么问题吗? 画廊.html

{% 用于画廊中的照片 %} ×
                                <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
                                        <div class="carousel-inner">
                                
                                        <div class="carousel-item">
                                
                                            <img src="{{photo.imageURL}}" alt="First slide">
                                          </div>
                            
                                    
                                        </div>
                                        <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
                                          <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                                          <span class="sr-only">PrevIoUs</span>
                                        </a>
                                        <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
                                          <span class="carousel-control-next-icon" aria-hidden="true"></span>
                                          <span class="sr-only">Next</span>
                                        </a>
                                      </div>







                         </div>
                         <div class="modal-footer">
                          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                         </div>
                        </div>
                       </div>
                    </div>
                {% endfor %}
              


              </div>
            </div>  
          </div> 

解决方法

请更改下面的照片url路径

<img src="{{photo.image.url}}" alt="First slide">