django-sys-indicator
A visual indicator of what environment/system you’re using in django.
To install:
Add "django_sys_indicator.apps.DjangoSysIndicatorConfig" to your INSTALLED_APPS
Add "django_sys_indicator.middleware.SystemIndicatorMiddleware" to your MIDDLEWARE
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;
Release files for django-sys-indicator 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_sys_indicator-2.2.0.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_sys_indicator-2.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.5 kB
Release files / django_sys_indicator-2.2.0.tar.gz
| Download URL | django_sys_indicator-2.2.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
551b0b5e1871d5dca84d2d63ed15a9de87fbb9f89aaf5341b43dd5ede7c4addd
|
|
BLAKE2b-256 checksum How to use checksums |
b7670f8690da9ff43da773dec6160ead5c9b330e15c18fd6aadb92036e1480a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / django_sys_indicator-2.2.0-py3-none-any.whl
| Download URL | django_sys_indicator-2.2.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c46237181985ecec63b2d16fbc3bb05c4ee265ffb6c3c8176f91d5164181fc2a
|
|
BLAKE2b-256 checksum How to use checksums |
556e29687e5f1ddaef0844d6ed9c28218d858e826ad7cc404fd17c1f21041eb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|