Skip to content

Customisable admin index #79

@morlandi

Description

@morlandi

This is more a suggestion than an issue.

I'm quite satisfied with the native Django admin, and always try to make as few customisations as possible, to prevent headaches later on when upgrading Django.

The only two aspects that bother me are:

  1. the ugly "new window" for related models, which django-admin-interface already solves with a much more effective dialog
  2. the admin index, which groups tables by app; I consider this unacceptable in many situations

Very often, the splitting of the project in apps is dictated by programmer's needs for code maintenance, which the end user doesn't understand (and doesn't care to understand).

I already have some shareable code to solve this problem.

Basically it requires:

  • overriding "admin/index.html"
  • a context processor to retrieve a customised list of apps and/or arbitrary links from project's settings
  • unfortunately, also overriding "admin/change_list.html" and "admin/change_form.html"; this is required for fixing the breadcrumbs

As a side benefit, the customised index decorates each link with specific classes (based on app_label and model_name), so the rendering can be further customised via CSS (for example providing a specific icon to each model).

Just let me know if you're interested in discussing this topic, and in case I'll provide much more details.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions