A Django app to define the ordering of inlines and fieldsets in Django Admin.
Project description
This app allows you to specify the ordering of inlines and fieldsets in Django Admin.
Quick start
Add “django_ifo” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ 'django_ifo', # must be before admin 'django.contrib.admin', ... ]
Add fieldsets_and_inlines_order field in UserAdmin:
# employee/admin.py class MyUserAdmin(UserAdmin): fieldsets_and_inlines_order = ('f', 'i') # 1 fieldset then 1 inline def add_view(self, *args, **kwargs): self.inlines = [] return super(UserAdmin, self).add_view(*args, **kwargs) def change_view(self, *args, **kwargs): self.inlines = [EmployeeInline] return super(UserAdmin, self).change_view(*args, **kwargs) admin.site.unregister(User) admin.site.register(User, MyUserAdmin)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-ifo-0.1.tar.gz
(3.2 kB
view details)
File details
Details for the file django-ifo-0.1.tar.gz
.
File metadata
- Download URL: django-ifo-0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cb1886fe42818e5ac46c2f6de4914faa879622673ce1a561e92b7644e606bfe |
|
MD5 | a58bf0898c5649d54f7859fb4a627108 |
|
BLAKE2b-256 | dbe63385fdae17052d9cb381b69d17116d8f0260523c913bc8915142cd3125a5 |