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-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 634ee6ad289b81b3b133a93fa980e862d404ee01543da5756ea03ed721098487 |
|
MD5 | 9a38a8930b5f7530d613c03f41f3fbfa |
|
BLAKE2b-256 | a3b084a7d9c5a664c429100834ecc44244cb94b32a9c1f206d74ad34772b6481 |
Close
Hashes for django_sys_indicator-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d36a9d142446710ee2d97f47f511cdd46470f9ccb495b9c273055a3296413c3c |
|
MD5 | 6fad5bf2eb76e6801898548834a8df62 |
|
BLAKE2b-256 | 94b0b2246395316389612200150b165bba0ee0f84c3561286cd47177e1578023 |