django模型中的单个字段
我想通过模型表单仅显示模型的一个字段,我尝试将该字段放入字段列表中,但它像这样崩溃 http://i1.imageban.ru/out/2011/03/18/f5b78d2a2351a1adeec3c8d2f5452859.png ,如果我添加任何其他字段,它工作正常,有人知道这是为什么吗?
I want to show only one field of a model though a modelform, I tried just putting that field in the fields list, but it crashes like this http://i1.imageban.ru/out/2011/03/18/f5b78d2a2351a1adeec3c8d2f5452859.png , if I add any other field it works fine, someone knows why that is?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
向我们展示一些代码,但看起来您没有将字段作为列表,例如您这样做了,
但您需要这样做
Show us some code, but looks like you did not put fields as a list e.g. you did
instead you need to do this