Skip to main content

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

  1. Add admin_reorder to INSTALLED_APPS:

    .. code-block:: python

    INSTALLED_APPS = ( ... 'admin_reorder', ... )

  2. Add the ModelAdminReorder to MIDDLEWARE_CLASSES:

    .. code-block:: python

    MIDDLEWARE_CLASSES = ( ... 'admin_model_list_order.middleware.AdminModelListOrder', ... )

  3. Add the setting admin_order to your admin.py: .. code-block:: python

    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

django-admin-model-list-order-0.0.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page