Orderable change lists and inlines done right^Wsimple
Project description
Steps
- Have a model ordered by an integer field.
- Install django-admin-ordering and add admin_ordering to INSTALLED_APPS.
- Inherit admin_ordering.admin.OrderableAdmin in your own ModelAdmin and StackedInline/TabularInline subclasses and set ordering_field to a field name of the ordering integer field. Also set fk_name to the parent foreign key if you want orderable inlines. Do absolutely nothing if you want an orderable changelist.
- Ensure that the field is displayed in the change form if you define fieldsets yourself, or is contained in list_editable for change lists.
- Report any bugs you find (patches welcome)!
Limitations
- Starting with Django 1.9 newly created inlines are automatically assigned a good ordering value. Earlier versions do not support the required formset:added signal.
- Only one inline can use this app per model right now.
- OrderableAdmin can be used both for inlines and parents, but this also means that you cannot register a model directly with OrderableAdmin.
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size django_admin_ordering-0.4.0-py2.py3-none-any.whl (20.8 kB) | File type Wheel | Python version 2.7 | Upload date | Hashes View |
Filename, size django-admin-ordering-0.4.0.tar.gz (18.1 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for django_admin_ordering-0.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77df2c3299ba0c53d4f141fad17c8ad244cdd75e94466cc89060c849f31c562c |
|
MD5 | 1fb3eee15a54c0e64b6cef24cc46effa |
|
BLAKE2-256 | 5b19f65a2247d45a9e8117cb2f4b466ba7ae675e9c4c723ccc6adf541e3bca54 |
Close
Hashes for django-admin-ordering-0.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c20e1fae627383375d81d28808a0a5cbccddb6ff4b7b666c29fb03722b1ec007 |
|
MD5 | f7467afe73f9ed6f34587b89c2ceda19 |
|
BLAKE2-256 | 5bce9d95dae34f9fbcca542d04eaa60542cffaeaff27648d6a1b5d2b023a31e9 |