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 应用程序还是我自己的?
基础教程推荐
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
