A system/environment indicator for django.
Project description
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;
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.2.0.tar.gz
.
File metadata
- Download URL: django_sys_indicator-2.2.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 551b0b5e1871d5dca84d2d63ed15a9de87fbb9f89aaf5341b43dd5ede7c4addd |
|
MD5 | ee62ca9d6643ec676d187f1e96459b6e |
|
BLAKE2b-256 | b7670f8690da9ff43da773dec6160ead5c9b330e15c18fd6aadb92036e1480a3 |
File details
Details for the file django_sys_indicator-2.2.0-py3-none-any.whl
.
File metadata
- Download URL: django_sys_indicator-2.2.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c46237181985ecec63b2d16fbc3bb05c4ee265ffb6c3c8176f91d5164181fc2a |
|
MD5 | 5ee2b5176c59bd1f833fd676eaf8a19d |
|
BLAKE2b-256 | 556e29687e5f1ddaef0844d6ed9c28218d858e826ad7cc404fd17c1f21041eb0 |