Django 的管理员对模型的只读权限在哪里?
我读过 How can I MODIFY django to create “view “权限? Django 1.2 附带了管理模型的只读权限。我在哪里设置这个选项?在身份验证应用程序中找不到它作为权限。
谢谢
I've read at How can I MODIFY django to create "view" permission? that Django 1.2 cames with a read-only permission for admin models. Where I set this option? It's not found as a permission in the auth app.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要按照链接答案中概述的步骤进行操作。本文中提到的 1.2 功能涉及将
editable=False
选项添加到模型的字段,这使得该字段在所有用户的管理界面中不可编辑。如果您确实缺少此功能,我建议您在 django 支持站点上开一张票,以将此修复添加到 django 中,但请记住 django 管理站点是针对 ADMINS 的。它并不是为所有用户设计的 CRUD 界面,只是一个用于深入研究数据并就地编辑数据的管理界面。只是随着时间的推移,人们才添加了越来越多的用户友好的增强功能。
You need to follow the steps outlined in the linked answer. The 1.2 feature mentioned in the article concerns adding the
editable=False
option to a model's field which renders the field non-editable in the admin interface for all users.If you really are missing this functionality i suggest opening a ticket on the django support site to have this fix added to django however remember that the django admin site is for ADMINS. It is not designed to be used as A CRUD interface for all users, just an administrative interface for diving into the data and editing it in place. It's only over time that people have been adding more and more User friendly enhancements to it.