Registry / web-framework / django-admin-env-notice

django-admin-env-notice

JSON →
library1.0.1pypypi✓ verified 84d ago

Visually distinguish environments (e.g., development, staging, production) in Django Admin with a customizable banner. Current version 1.0.1. Low release cadence.

pip install django-admin-env-notice
INSTALL
IMPORT
SIG · DJANGO-ADMIN-ENV-N
D
django-admin-env-notice
web-frameworkpythonv1.0.1
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_version
from django_admin_env_notice import get_version
from django.conf import settings

Add 'admin_env_notice' to INSTALLED_APPS and set ENV_NOTICE_SETTINGS in settings.py.

# Install: pip install django-admin-env-notice # settings.py INSTALLED_APPS = [ ... 'admin_env_notice', ] ENV_NOTICE_SETTINGS = { 'ENVIRONMENT_NAME': os.environ.get('ENVIRONMENT_NAME', 'Development'), 'ENVIRONMENT_COLOR': os.environ.get('ENVIRONMENT_COLOR', '#808080'), }
Debug
Known issues
gotchaThe environment notice only appears in Django Admin, not on the frontend.
fix
If you need frontend notices, consider using a different approach or custom middleware.
affects: all
gotchaThe 'ENVIRONMENT_NAME' and 'ENVIRONMENT_COLOR' are not set by default; you must configure them or the notice will use default values (likely gray 'Development').
fix
Set these settings in your environment or in settings.py to avoid using defaults.
affects: all
deprecatedThe setting name 'ENVIRONMENT_NAME' and 'ENVIRONMENT_COLOR' are case-sensitive. Older documentation may use 'environment_name'.
fix
Use uppercase keys as shown in the quickstart.
affects: <=1.0.0?
Upgrade
Version history
1.0.1latest on PyPI · released Oct 19, 2024
Audit
Dependencies
djangorequiredRequires Django's admin contrib app
Agent activity
2 hits · last 30 days
node
2
Resources
django-admin-env-notice — pip install django-admin-env-notice · libregistry