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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1298b4ca382451fd4bc45390a491100bc0f52177ce77cad51fd150ed7801517 |
|
MD5 | 5e26099002b94fef47c3600c9732cf8b |
|
BLAKE2b-256 | d3aa887ed189dd430bc65382addfb95499b350d2a9f61bae5c4277a408d51305 |
Close
Hashes for django_sys_indicator-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5f1fa96b88a01f553bf1702c945f127ace2187a1ea4913b453f4897aece6e2a |
|
MD5 | 89e3c00be680b670ce3129108f2b6e47 |
|
BLAKE2b-256 | a62d1f0d10b1ce6ac0b2a20cc33b2678ad8ab80a2cfdc003a652f5c47dc846a6 |