Admin index for Django.
Project description
- Version:
- 1.3.0
- Download:
- Source:
- Keywords:
django, admin, dashboard
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:
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.
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' ], }, }, ]
Create the database tables by performing a database migration:
$ python manage.py migrate admin_index
Go to the Django admin of your site and look for the “Application groups” section.
Configuration
There are 3 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.
NOTE: If no Application groups are defined, it will show all models regardless of this setting.
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.
NOTE: If no Application groups are defined, it will show all models regardless of this setting.
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. It will not update existing Application groups.
ADMIN_INDEX_SHOW_MENU (defaults to: True)
Show the admin index as a menu above the breadcrumbs. Submenu’s are filled with the registered models.
ADMIN_INDEX_HIDE_APP_INDEX_PAGES (defaults to: True)
Removes the links to the app index pages from the main index and the breadcrumbs.
Extra
Sticky header
The header (typically “Django administration”) including the menu (added by this library) and the breadcrumbs, all become sticky (ie. they stay visible when you scroll down on large pages). If you don’t want this, you can add some CSS lines, like:
#header { position: initial; } .dropdown-menu { position: initial; } .breadcrumbs { position: initial; }
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.
Source Distribution
Built Distribution
File details
Details for the file django_admin_index-1.3.0.tar.gz
.
File metadata
- Download URL: django_admin_index-1.3.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7899866228cf79eedc74624d8d99d9a13d55a8f2a85ede118364168610d1b39 |
|
MD5 | ba11b07b87fdc8e896b25984716ca5ed |
|
BLAKE2b-256 | 068bdb45f7ec528f917e9db494315db596b194601ccaac8728b5307e8c69530c |
File details
Details for the file django_admin_index-1.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_admin_index-1.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0811a798096cb12a41b5204da6db405e1271607ed09e9b17a7f765235b63d4a7 |
|
MD5 | 83ed8305ce15894f77a6fdc26f763989 |
|
BLAKE2b-256 | 5ccef78a1c9a19cc7234f8fff76c3a0fe917c55d2a4f599f60aea4857d353c1d |