Django Admin app or roll my own?(Django Admin 应用程序还是我自己的?)
问题描述
我刚刚开始将 Django 用于个人项目.
I'm just starting to use Django for a personal project.
使用内置管理应用程序与将我的管理功能集成到应用程序本身(通过检查 request.user.is_staff)有什么优缺点?
What are the pros and cons of using the built-in Admin application versus integrating my administrative functions into the app itself (by checking request.user.is_staff)?
这是一个社区 wiki,因为它可以被视为投票.
This is a community wiki because it could be considered a poll.
推荐答案
这真的取决于我猜的项目.虽然您可以在管理员中完成所有操作,但当您的应用程序变得更加复杂时,使用管理员也会变得更加复杂.如果您想让您的应用真正易于管理,您需要控制每一个小细节,而这对于管理应用来说是不可能的.
It really depends on the project I guess. While you can do everything in the admin, when your app gets more complex using the admin gets more complex too. And if you want to make your app really easy to manage you want control over every little detail, which is not really possible with the admin app.
我猜你应该是这样看的:
I guess you should see it like this:
使用 django admin:节省编写时间,浪费时间使用它.
滚动您自己的管理员:浪费时间编写它,节省使用它的时间.
Using django admin: save time writing it, lose time using it.
Rolling your own admin: lose time writing it, save time using it.
这篇关于Django Admin 应用程序还是我自己的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Django Admin 应用程序还是我自己的?
基础教程推荐
- 在 Python 中将货币解析为数字 2022-01-01
- 对多索引数据帧的列进行排序 2022-01-01
- matplotlib 设置 yaxis 标签大小 2022-01-01
- Python,确定字符串是否应转换为 Int 或 Float 2022-01-01
- kivy 应用程序中的一个简单网页作为小部件 2022-01-01
- Kivy 使用 opencv.调整图像大小 2022-01-01
- 在 Django Admin 中使用内联 OneToOneField 2022-01-01
- 究竟什么是“容器"?在蟒蛇?(以及所有的 python 容器类型是什么?) 2022-01-01
- Python 中是否有任何支持将长字符串转储为块文字或折叠块的 yaml 库? 2022-01-01
- 比较两个文本文件以找出差异并将它们输出到新的文本文件 2022-01-01
