Lets say I have a group of models that must be kept separate (visually) in the admin from another group.
Right now they are alphabetic, which jumbles them.
I'd like to organize them this way:
I cannot seem to find the documentation on how to do this. Is this even possible?
Groups are a means of categorizing users. This allows for granting permissions to a specific group.
I do not think that splitting up your business logic, i.e. your app, when all you want to achieve is some kind of markup is the right way. Instead I found the Python package django-modeladmin-reorder that lets you achieve this easily. You can combine its feature of labelling apps and reordering models to group models of one app in the admin. After following the installation instructions, add something like this to your settings.py
ADMIN_REORDER = ( # First group {'app': 'myapp', 'label': 'Group1', 'models': ('myapp.Model_1', 'myapp.Model_4',) }, # Second group: same app, but different label {'app': 'myapp', 'label': 'Group2', 'models': ('myapp.Model_2', 'myapp.Model_3',) },)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With