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
File details
Details for the file django-sys-indicator-2.1.0.tar.gz
.
File metadata
- Download URL: django-sys-indicator-2.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1298b4ca382451fd4bc45390a491100bc0f52177ce77cad51fd150ed7801517 |
|
MD5 | 5e26099002b94fef47c3600c9732cf8b |
|
BLAKE2b-256 | d3aa887ed189dd430bc65382addfb95499b350d2a9f61bae5c4277a408d51305 |
Provenance
File details
Details for the file django_sys_indicator-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_sys_indicator-2.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5f1fa96b88a01f553bf1702c945f127ace2187a1ea4913b453f4897aece6e2a |
|
MD5 | 89e3c00be680b670ce3129108f2b6e47 |
|
BLAKE2b-256 | a62d1f0d10b1ce6ac0b2a20cc33b2678ad8ab80a2cfdc003a652f5c47dc846a6 |