【发布时间】:2015-05-03 22:08:05
【问题描述】:
假设我在myproject/myapp/models.py 中有一个TrueFalseQuestion 模型(它只有一个question_text),并且我希望它呈现为,比方说
<a>Question Text</a>
<input type="radio">True</input>
<input type="radio">False</input>
(HTML 可能是错误的,不重要) ,在这个模板中,只有Question Text 部分改变,输入形式总是不变的。那么如何在 Django 中实现这种行为呢?
一个例子将不胜感激。谢谢!
【问题讨论】:
标签: python html django django-models django-templates