Custom ordering for models in the admin app.
Project description
django-admin-model-list-order
Custom ordering for models in the admin app. You can define your order by admin_order
in ModelAdmin
Install
Install django-admin-model-list-order:
.. code-block:: bash
pip install django-admin-model-list-order
Configuration
- Add
admin_model_list_order
toINSTALLED_APPS
:
.. code-block:: bash
INSTALLED_APPS = (
...
'admin_model_list_order',
...
)
- Add the
ModelAdminReorder
toMIDDLEWARE_CLASSES
:
.. code-block:: bash
MIDDLEWARE_CLASSES = (
...
'admin_model_list_order.middleware.AdminModelListOrder',
...
)
- Add the setting
admin_order
to your admin.py:
.. code-block:: bash
class YourModelAdmin(admin.ModelAdmin):
model = YourModel
admin_order = 1
History
0.0.1 (2021-07-27) ++++++++++++++++++
- First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-admin-model-list-order-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f861bbe0f3b5102fe6900dd23fa6ceb798e6fc1508e7bad9520926dc0109a3e |
|
MD5 | 81c42c729cd106ed55cd02dfb51c32e8 |
|
BLAKE2b-256 | 5f1549da6a2438f25393aecce87ccb437d9ef291bb4af84d8615da22c4da9e84 |