Django 的管理员对模型的只读权限在哪里?

发布于 2024-10-22 00:23:43 字数 229 浏览 6 评论 0原文

我读过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

舟遥客 2024-10-29 00:23:43

您需要按照链接答案中概述的步骤进行操作。本文中提到的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文