该回答引用ChatGPT
问题在于您的url标签中嵌套了另一个模板标签,这会导致Django无法正确解析您要访问的url。您可以使用以下方法来解决此问题:
{% for vo in buildinglist %}
<div class="col-lg-4 col-sm-6 layout-item-wrap">
<article class="property layout-item clearfix">
<figure class="feature-image">
<a class="clearfix zoom" href="{% url vo.name %}"><img data-action="zoom"
src="/static/uploads/building/{{ vo.cover_pic }}" alt=""></a>
</figure>
<div class="property-contents clearfix">
<header class="property-header clearfix">
<div class="pull-left">
<h6 class="entry-title"><a href="{% url vo.name %}">{{ vo.name }}</a></h6>
<span class="property-location"><i class="fa fa-map-marker"></i> {{ vo.address }}</span>
</div>
</header>
</div>
</article>
</div>
{% endfor %}
在这里,我们从url标签中删除了额外的双括号和引号,并直接传递了vo.name作为参数。这将使Django正确解析您要访问的url。