{"id":21136,"library":"django-admin-env-notice","title":"Django Admin Environment Notice","description":"Visually distinguish environments (e.g., development, staging, production) in Django Admin with a customizable banner. Current version 1.0.1. Low release cadence.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/dizballanze/django-admin-env-notice","tags":["django","admin","environment","notice","banner"],"install":[{"cmd":"pip install django-admin-env-notice","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Requires Django's admin contrib app","package":"django","optional":false}],"imports":[{"note":"This setting is accessed via settings.ENV_NOTICE_SETTINGS, not imported directly.","wrong":"","symbol":"ENV_NOTICE_SETTINGS","correct":"from django.conf import settings"}],"quickstart":{"code":"# Install: pip install django-admin-env-notice\n# settings.py\nINSTALLED_APPS = [\n    ...\n    'admin_env_notice',\n]\n\nENV_NOTICE_SETTINGS = {\n    'ENVIRONMENT_NAME': os.environ.get('ENVIRONMENT_NAME', 'Development'),\n    'ENVIRONMENT_COLOR': os.environ.get('ENVIRONMENT_COLOR', '#808080'),\n}\n","lang":"python","description":"Add 'admin_env_notice' to INSTALLED_APPS and set ENV_NOTICE_SETTINGS in settings.py."},"warnings":[{"fix":"If you need frontend notices, consider using a different approach or custom middleware.","message":"The environment notice only appears in Django Admin, not on the frontend.","severity":"gotcha","affected_versions":"all"},{"fix":"Set these settings in your environment or in settings.py to avoid using defaults.","message":"The 'ENVIRONMENT_NAME' and 'ENVIRONMENT_COLOR' are not set by default; you must configure them or the notice will use default values (likely gray 'Development').","severity":"gotcha","affected_versions":"all"},{"fix":"Use uppercase keys as shown in the quickstart.","message":"The setting name 'ENVIRONMENT_NAME' and 'ENVIRONMENT_COLOR' are case-sensitive. Older documentation may use 'environment_name'.","severity":"deprecated","affected_versions":"<=1.0.0?"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Add 'admin_env_notice' to INSTALLED_APPS in your Django settings.","cause":"Did not add the app to INSTALLED_APPS.","error":"ModuleNotFoundError: No module named 'admin_env_notice'"},{"fix":"Add ENV_NOTICE_SETTINGS = {} to your settings file.","cause":"ENV_NOTICE_SETTINGS dict not defined in settings or defined incorrectly.","error":"AttributeError: 'Settings' object has no attribute 'ENV_NOTICE_SETTINGS'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}