Skip to main content

Admin index for Django.

Project description

Version:
1.0
Download:

https://pypi-hypernode.com/pypi/django_admin_index

Source:

https://github.com/maykinmedia/django-admin-index

Keywords:

django, admin, dashboard

Build status coverage Lintly BSD License Supported Python versions Supported Django versions

About

This extension enables you to group, order and customize the Django admin index page without too much hassle or visual changes.

There are 2 concepts: Application groups and Application links. You can create an application group and add any model to it in the Django admin, under Admin index. Whether the models are shown to the user, depends on the regular Django permissions and whether it’s registered in the admin.

An application link is simply a URL with a name that you can add to an application group. It shows as a regular Django model.

One final change in the Django admin is the removal of the App lists, that link to a list of models within an App. This concept became obsolete.

Installation

You can install django_admin_index either via the Python Package Index (PyPI) or from source.

To install using pip,:

$ pip install -U django_admin_index

Usage

To use this with your project you need to follow these steps:

  1. Install the django_admin_index library:

    $ pip install django_admin_index
  2. Add django_admin_index and ordered_model to INSTALLED_APPS in your Django project’s settings.py. Make sure that django_admin_index comes before django.contrib.admin:

    INSTALLED_APPS = (
        'django_admin_index',
        'ordered_model',
        ...,
        'django.contrib.admin',
    )

    Note that there is no dash in the module name, only underscores.

  3. Add django_admin_index.context_processors.dashboard to the context processors in your Django project’s settings.py:

    TEMPLATES = [
        {
            ...
            'OPTIONS': {
                'context_processors': [
                    ...
                    'django_admin_index.context_processors.dashboard'
                ],
            },
        },
    ]
  4. Create the database tables by performing a database migration:

    $ python manage.py migrate admin_index
  5. Go to the Django admin of your site and look for the “Application groups” section.

Configuration

There are 2 settings you can add to your settings.py:

  • ADMIN_INDEX_SHOW_REMAINING_APPS (defaults to False)

    Show all models that are not added a to an Application group in a group called “Miscellaneous” for staff users.

  • ADMIN_INDEX_SHOW_REMAINING_APPS_TO_SUPERUSERS (defaults to True)

    Show all models that are not added a to an Application group in a group called “Miscellaneous” for super users users.

  • ADMIN_INDEX_AUTO_CREATE_APP_GROUP (defaults to False)

    Automaticly creates an Application group, based on the app_label, for all the models that would be in the “Miscellaneous” group. If True, your Django admin will initially look as it normally would.

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_index-1.0.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

django_admin_index-1.0.0-py2.py3-none-any.whl (20.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django_admin_index-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django_admin_index-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cae0aeed9f4fc140f7c1c3be6485c1878eae446484fc5baa592a85cf64ed1a95
MD5 087d6b9b783e3e115e199c7d572e12f9
BLAKE2b-256 020dfd2894dd1a8696d37813e6060a3c6b7745864b445aa02610ee3e7660ee6b

See more details on using hashes here.

File details

Details for the file django_admin_index-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_index-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8d3d32868abfe2974e6dcb608687b852ac93feca483c0b03d50c6d0cbf325630
MD5 162262cae5c0a2dad6cd0b55b343289f
BLAKE2b-256 93420df057d5b6a13957bbe4aae7040097fe1c06f8efe65c55da36acb51742c0

See more details on using hashes here.

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