【发布时间】:2012-07-29 23:19:59
【问题描述】:
我想让表单中的某些字段只读,而其他字段可编辑。我用 HTML (Read only) 阅读了这篇文章
<form action="demo_form.asp">
Country: <input type="text" name="country" value="Norway" readonly="readonly" /><br />
<input type="submit" value="Submit" />
</form>
此示例特别说明了可编辑的字段。但我正在使用 Django 表单。我无法具体执行此操作,因为该字段源自 models.py。
在使字段只读方面我有哪些选择?需要一些建议和指导...
【问题讨论】:
标签: html django django-forms