Django admin 很难定制吗?

2022-01-25 00:00:00 python django customization django-admin

问题描述

我已经和 Django Admin 一起玩了几天来探索它,但我仍然不知道如何以我们需要的方式自定义它.

I have been playing for a couple of days with Django Admin to explore it, but I am still clueless of how it can be customized in the way we need.

每次我在管理面板中寻找任何有关自定义的帮助时,我都会发现各种社区和论坛上的一堆文章,解释了如何自定义模板、列表项、列视图等.但这不应该被称为 Django 定制.

Every time I look for any help for the customization in the admin panel, what I find is, a bunch of articles on various communities and forums, explaining how to customize the template, the lists items, the the column views etc. But that should not be called Django Customization.

如果我需要对用户功能进行微小的更改或对身份验证模块进行任何修改.即使在弄清楚如何做到这一点方面也需要付出很多努力.

If I need to make even a small change in the User functionality or any modification to the auth module. It takes a lots of efforts even in figuring out how that can be done.

Django 是不是很难定制,或者它只是缺乏互联网上的帮助,或者是我走错了方向?

Is Django that difficult to customize or its just lack of the help available over internet for this or its me who is moving in the wrong direction ?


解决方案

你没有提供足够的细节来说明你想要实现的目标,所以很难说任务有多复杂.您可能还想考虑根本不修改管理站点并在适当的情况下构建自己的视图.

You are not providing enough details on what you want to achieve, so it's difficult to say how complex the task is. You might also want to consider not modifying the admin site at all and building your own views where appropriate.

但是,这里有一些很好的链接可以帮助您入门:

However, here are some good links to get you started:

  • 自定义 Django 管理员
  • 与 Django 管理员一起做更多事情
  • 扩展 Django 的用户管理员李>

相关文章