擅长:python、mysql、java
<p>嗯,看起来你的模板渲染得很好。因此,您必须查看<code>draft_list</code>是否实际包含任何内容,以及每个被捕获的对象的<code>playernumber</code>。</p>
<p>在项目的根目录中,运行:</p>
<pre><code>python manage.py shell
</code></pre>
<p>现在您在shell中,要测试数据库中是否实际存在任何<code>Player</code>对象,并查看每个对象的<code>playernumber</code>属性返回什么:</p>
<pre><code>from acme.acmetest.models import Player
draft_list = Player.objects.all()
for draft in draft_list:
print draft.playernumber
</code></pre>