A system/environment indicator for django
Project description
django-sys-indicator
A visual indicator of what environment/system you're using in django.
To install:
- Add
'django_sys_indicator.apps.DjangoSysIndicatorConfig'
to yourINSTALLED_APPS
- Add
'django_sys_indicator.middleware.SystemIndicatorMiddleware'
to youMIDDLEWARE
Configuration settings and their defaults
SYSTEM_INDICATOR_ENABLED = False
SYSTEM_INDICATOR_LABEL = 'localhost'
SYSTEM_INDICATOR_COLORS = {
# Format here is colour, border colour
'red': ('#c50000', '#daa'),
'blue': ('#006fc4', '#aad'),
'green': ('#009e00', '#ada'),
'purple': ('#800080', '#dad'),
'orange': ('#ff7700', '#ffb57d'),
}
SYSTEM_INDICATOR_COLOR = 'red'
SYSTEM_INDICATOR_EXCLUSIONS = []
To exclude paths, include regex in SYSTEM_INDICATOR_EXCLUSIONS
::
import re
SYSTEM_INDICATOR_EXCLUSIONS = [
re.compile('^/[^/]+/admin/.*$'),
]
Example of a localhost indicator in admin;
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
Built Distribution
Close
Hashes for django-sys-indicator-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 731f2a40e85ad382a62f0c1f3df1d239550e51b6f9122befacf89e16bb182258 |
|
MD5 | 211db14390eb2e21cb6e1880e6bb0ed9 |
|
BLAKE2b-256 | f0e850fa7317e13e5860ff5cb7d0c7e4e5abfcb6ca533c267eed1a0d54aab371 |
Close
Hashes for django_sys_indicator-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49f5ca824e0f628b067000c8d6add09fca85652a6bdd5de6f5037f60331f5858 |
|
MD5 | ea996ce03dd7e94d35c8b99d5a01ad71 |
|
BLAKE2b-256 | 22ff06e3c283996ba7e8c8fe50b2b5e81ffa0bbde500cae727120dd9eae42886 |