I have a django project, which contains several models with natural grouping, as well as some off-the-shelf models from install libraries.
I am trying to have this natural grouping reflected in the admin hope page, as well as the side navigation (nav bar) of the admin panel. By using django-modeladmin-reorder library, the home page is properly grouped as I want. Though, the nav bar ordering is not working and the models appear in their original order (alphabetically, grouped by the library/file where they are fetched from).
I have tried several complex (or more complex than just plugging a library) solutions, such as overriding the nav bar/app list html of django and create other templates and creating custom middlewares.
The django-modeladmin-reorder library looks like it is not maintained, with issues (e.g. the issue already raised in early 2020 for nav-bar customization) in the github repo remaining unanswered for 2 to 3 years now. This affects the nav-bar customization, which is supposedly support by the library.
Thankfully, in the same issue, given as an example above, a user has provided their local repo for which they are handling the nav-bar functionality. Unfortunately, despite having a PR created, this is not accepted (at the time of writing this).
If you already using the library, moving from the library to the local repo should be easy and nearly plug'n'play. All you have to do is uninstall the library that you already use for the reordering:
Then you can re-install it through the local report:
If that fails you can try to change git+git to git+https:
Then all you have to do is to re-run your server and changes should be available both in the homepage and in the nav bar.
My custom homepage
My custom nav bar