Put most used and important models to the top of your Django admin index.
Project description
django-admin-top-models
Put most used and important models to the top of your Django admin index.
INSTALL
pip install django-admin-top-models
Configuration
Add admin_top_models to INSTALLED_APPS:
INSTALLED_APPS = ( ... 'admin_top_models', ... )
Add admin_top_models.middleware.AdminTopModelsMiddleware to MIDDLEWARE_CLASSES:
MIDDLEWARE_CLASSES = ( ... 'admin_top_models.middleware.AdminTopModelsMiddleware', ... )
Add ADMIN_TOP_MODELS_CONFIG setting to your settings.py:
ADMIN_TOP_MODELS_CONFIG = ( ('firstapp', ('First', 'Third')), ('secondapp', ('DModel', 'CModel', 'AModel')), ('auth',), )
Adjust other options (if you need to. These are defaults):
# should the '--------------------' spacer be added between your top and the rest models? ADMIN_TOP_MODELS_INSERT_SPACER = True ADMIN_TOP_MODELS_SPACER_NAME = '-' * 20 # if this is set to True, order of apps and models will be the same across different languages, # otherwise django's order by translated names will be used. ADMIN_TOP_MODELS_ALWAYS_SORT_BY_OBJECT_NAME = False
CHANGELOG
0.0.3 (2016-07-09)
Fixed RST inconsistent title levels in the README
0.0.2 (2016-07-09)
Added README
Fixed IndexError when a second item of the config tuple is absent, like in ('thirdapp',)
Fixed spacer position shift when the config includes models which are not actually present
0.0.1 (2016-07-08)
Initial working version
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
File details
Details for the file django-admin-top-models-0.0.3.tar.gz
.
File metadata
- Download URL: django-admin-top-models-0.0.3.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c16bafe7921c3d00f06108f756912c4df9d217420447210c51eb67b2308a7b2b |
|
MD5 | 7b583fe6f790e7ab14b4fe6a7409acf2 |
|
BLAKE2b-256 | 4cc58a45f528166b481a8fd63b4a00add1fd0aedcc7dfa5010a7b0aadc6d0210 |