使用 Django Admin 实现自定义数据库解决方案

发布于 2024-09-04 20:10:14 字数 366 浏览 5 评论 0原文

客户希望有一个简单的 Intranet 应用程序来管理他的流程。他运行查询并希望跟踪每天交付的负载数量和相关活动。

由于我了解 Django 出色的管理界面,我想我可以在 models.py 中定义“架构”并让 Django Admin 生成表单。

我正是这样做的,结果一点也不差。我已经能够定制外观和感觉来满足客户的品味。

一些问题:

  1. Django Admin 是这种用例的正确选择吗?
  2. 由于框架的灵活性,我将来会遇到问题吗?
  3. 是否有专门针对此用例(小型企业的通用数据库管理)设计的更好的框架?我更喜欢用 Python 编写的,因为我可以对其进行修改以进行自定义。

谢谢!

A client wants to have a simple intranet application to manage his process. He runs a query and wishes to track number of loads delivered per day and associated activities.

Since I knew about Django's excellent Admin interface, I figured I could define the "Schema" in models.py and have Django Admin generate the forms.

I did exactly that and the result is not bad at all. I've been able to customize the look and feel to suit the client's taste.

Some questions:

  1. Is Django Admin the right choice for such a use-case?
  2. Will I run to problems in the future due to flexibility of the framework?
  3. Is there a better framework out there specifically designed for this use-case (general Database management for small businesses)? I prefer ones written in Python since I can hack it up to customize.

Thanks!

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

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

发布评论

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

评论(2

苹果你个爱泡泡 2024-09-11 20:10:14

根据我个人的经验,Django 是一个不错的选择,因为它能够在数据库之上拥有漂亮的 UI。

尝试自定义管理界面时,您有可能会遇到灵活性问题...但是,使用 Django 的 ModelForms 和模板 - 创建您自己的 CRUD 应用程序很容易 - 如果您无法在管理界面中执行所需操作。

就 Python 框架而言,我个人更喜欢 Django,而不是 Turbogears 或 Pylons(我相信它们也有管理界面),因为它的安装、设置和运行似乎要简单得多。

再次强调,这只是我个人的偏好。 ymmv。

In my personal experience, Django is a good choice for just being able to have a nice-looking UI on top of a database.

There is a chance you could run into flexibility issues trying to customize the admin interface... however, using Django's ModelForms and Templates - it is easy to create your own CRUD application - if you can't do what you need in the admin interface.

As far as Python frameworks go, I personally prefer Django over Turbogears or Pylons (which I believe also have admin interfaces) because it seems much simpler to get installed, setup and running.

Again, that is just my personal preference. ymmv.

回眸一遍 2024-09-11 20:10:14

我一直想做类似的事情,答案是,一般来说,您不想破解管理界面,因为这不是它的目的,迟早您会遇到一些灵活性问题。

检查我的问题:如何在 Django 中实现客户端管理?

话虽如此,我还是会坚持使用 django。

I've been tempted to do something similar, and the answer is that in general, you don't want to hack the admin interface, because that's not it's purpose, and sooner or later you'll run into some flexibility issues.

Check my Q: How to implement a client admin in Django?

Having said so, I'd stick with django.

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