django admin:公司分支机构必须仅管理其跨多个模型的记录

发布于 2024-08-02 18:55:44 字数 186 浏览 4 评论 0原文

一家在世界各地拥有许多分支机构的公司使用同一个应用程序。每个分支机构的主管登录到相同的/admin,应该只能看到并能够管理他们在多个模型(博客、画廊、订阅用户、客户列表等)中的记录。

如何在 django 中最好地解决这个问题?我需要一个灵活可靠的解决方案,而不是黑客。从来没有遇到过这个任务,所以暂时不知道该怎么做。

发射机

One company with many branches across the world using the same app. Each branch's supervisor, signing into the same /admin, should see and be able to manage only their records across many models (blog, galleries, subscribed users, clients list, etc.).

How to solve it best within django? I need a flexible and reliable solution, not hacks. Never came across this task, so really have no idea how to do it for the moment.

Tx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

几味少女 2024-08-09 18:55:44

这里有一个关于 Django Admin 的很好的教程。它包括自定义管理员以添加行级权限(据我所知,这就是您想要的)。

There is a nice tutorial here on Django Admin. It includes customizing the Admin to add row-level permissions (which, as i understand it, is what you want).

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