我学习django到第四章 choice按钮怎么显示不出来?
django吧
全部回复
仅看楼主
level 5
bdb_eagle 楼主
python:3.4.4
django:1.9.6
polls/templates/detail.html
<h1>{{ question.question_text }}</h1>
{% if error_message %}<p><strong>{{ error_message }}</strong></p> {% endif %}
<form action="{% url 'polls:vote' question.id %}" method="post">
{% csrf_token %}
{% for choice in question.choice_set.all %}
<input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" />
<label for="choice{{ forloop.counter }}">{{ choice.choice_text }}</label><br />
{% endfor %}
<input type="submit" value="Vote" />
</form>
2016年05月21日 03点05分 1
level 9
学习讨论群:149290512
2016年05月21日 07点05分 2
哈哈 解决了 是数据问题 没仔细看文档
2016年05月23日 13点05分
@bdb_eagle 啥子意思,我也遇到这个问题了,求助
2017年03月23日 10点03分
1