Python django模板';s不显示for循环内容

Python django模板';s不显示for循环内容,python,for-loop,django-models,django-views,django-templates,Python,For Loop,Django Models,Django Views,Django Templates,这是我的观点 return render(request, "auctions/close.html",{ "winners":Bid.objects.all() }) {%extensed“auctions/layout.html”%} {%block body%} 此项目的获胜者是 {winners%中的获胜者为%} {{winner.user} {%endfor%} {%endblock%} 这是close.html模板。但这里f

这是我的观点

return render(request, "auctions/close.html",{
"winners":Bid.objects.all()
        })
{%extensed“auctions/layout.html”%}
{%block body%}
此项目的获胜者是
{winners%中的获胜者为%}
{{winner.user}
{%endfor%}
{%endblock%}
这是close.html模板。但这里for循环不起作用。。。。
有人能告诉我这里出了什么问题吗…

这里的“for循环不起作用”是什么意思?是否发生了任何错误,或者您可以在页面上看到空的h2标记(Bid中可能根本没有对象…打印它们Bid.objects.all()…也可以是具体的您想要打印的内容{{winner.user.username})?可以是很多东西:
Bid.objects.all()
可能为空
Bid
可能没有
user
属性,所说的
user
属性可能为空,等等。。你看到这个项目的获胜者是-部分了吗?没有,我查过了,它不是空的。我想打印投标模型中的用户。
{% extends "auctions/layout.html" %}
{% block body %}

The winner for this item is

{% for winner in winners %}

<h2>{{winner.user}}</h2>

{% endfor %}
{% endblock %}