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-modeladmin-reorder:
.. code-block:: bash
pip install django-admin-modellist-order
Configuration
-
Add
admin_reorder
toINSTALLED_APPS
:.. code-block:: python
INSTALLED_APPS = ( ... 'admin_reorder', ... )
-
Add the
ModelAdminReorder
toMIDDLEWARE_CLASSES
:.. code-block:: python
MIDDLEWARE_CLASSES = ( ... 'admin_model_list_order.middleware.AdminModelListOrder', ... )
-
Add the setting
admin_order
to your admin.py: .. code-block:: pythonclass 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
Hashes for django-admin-model-list-order-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f790b7ad0e704660232a28a97ebfdda8f70aaf79ec06e183a63dba03d7797e0 |
|
MD5 | 8c14ec0911a20f5e1870ab0605af7524 |
|
BLAKE2b-256 | d74274f191733dc4f1721cf79dc630e26c41984b76ed8ee5279929260d2adf54 |