是否可以在 Django 中创建多个管理界面?

发布于 2024-09-24 12:52:22 字数 247 浏览 2 评论 0原文

我在此处提出了类似的问题。我没有得到很多有用的答案。可能这个问题很混乱。为了简单起见,我有不同的用户使用不同的数据库。我想为每个人创建一个单独的管理界面,以便用户只能看到和修改与他们相关的表。由于各种原因,多数据库选项对我不起作用。

提前致谢。

I asked a similar question here. I didn't get many useful answers. May be the question was confusing. So to make it simple, I have different databases used by different users. I want to create a separated admin interface for each of them so that the users will see and modify only the tables related to them. For various reasons multi-db option is not working for me.

Thanks in advance.

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

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

发布评论

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

评论(1

无人接听 2024-10-01 12:52:22

django 有一个功能,允许将表限制为特定用户。我建议您查看 django.contrib.auth 和它的内置权限。
如果您需要能够完全阻止对特定管理部分的访问,您可以在 admin.py 中覆盖管理站点的行为

django has a feature which allows restriction of tables to specific users. i suggest you look into django.contrib.auth and it's inbuilt permissions.
If you require the ability to completely block access to specific admin sections, you can override the behaviour of the admin site in your admin.py

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