skillfed

django-admin-env-notice

Visually distinguish environments in Django Admin

django-admin-env-notice v1.0.1 125.0K downloads/30d#11,844 on PyPI344
Permissive license MIT AGING released

What it is and what it does

django-admin-env-notice is a small Django app that injects a colored banner into the Django Admin interface to label the current environment. It solves a critical safety problem: preventing accidental administrative actions (like deleting data) in production when you meant to act on staging or development. You configure it by adding the app to INSTALLED_APPS, registering its context processor, and setting two Django settings—ENVIRONMENT_NAME and ENVIRONMENT_COLOR—to define what label and color the banner should display.

The banner is fixed to the top of the admin interface by default but can be made to float instead. You can customize the text color, choose which DOM selector the banner attaches to (useful if you use admin themes like Grappelli), and optionally hide it from unauthenticated users. It has no runtime dependencies and installs as a pure Python wheel, making it lightweight to add to any Django project.

Use it for:

  • Label production admin with a red banner to make it visually distinct from staging or development environments.
  • Prevent accidental data deletion or configuration changes by making the environment immediately obvious when logging into admin.
  • Customize banner appearance per environment (e.g., green for dev, yellow for staging, red for production) to reinforce environment awareness.
  • Hide the banner from unauthenticated users to avoid leaking environment information to unauthorized viewers.
  • Integrate with Django admin themes like Grappelli by adjusting the DOM selector the banner attaches to.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds a colored banner to Django Admin to visually label the current environment (e.g., production, staging) and help prevent accidental changes in the wrong environment.

Yes, if you run Django Admin in multiple environments. It is a low-friction, zero-dependency safety tool that directly addresses a real operational risk—mistaking one environment for another in the admin interface. The aging maintenance status is not a blocker for a stable, focused package with no dependencies, but verify compatibility with your Django version before deploying.

Install

django-admin-env-notice on PyPI

pip

pip install django-admin-env-notice

uv

uv add django-admin-env-notice

poetry

poetry add django-admin-env-notice

Installing django-admin-env-notice

Before you install

Low friction: pure Python wheel with no runtime dependencies. Maintenance is aging—last commit was 2026-01-22 and the package went 664 days between releases, though the repo remains active and unarchived.

License in practice

MIT license (permissive) means you can use, modify, and distribute the package freely with minimal restrictions.

Quickstart

pip install django-admin-env-notice

# In settings.py INSTALLED_APPS (before django.contrib.admin):
INSTALLED_APPS = [
    'django_admin_env_notice',
    'django.contrib.admin',
]

# Add context processor and set environment:
ENVIRONMENT_NAME = "Production"
ENVIRONMENT_COLOR = "#FF2222"

Requires Django 1.9+ and Python 2.7 or 3.4+; must be added to INSTALLED_APPS before django.contrib.admin and requires a context processor in TEMPLATES configuration.

Verify before relying

  • Whether the package works with modern Django versions (3.2+, 4.0+) despite the oldest classifier being Django 1.9.
  • Current test coverage and whether tox tests still pass on all listed Python versions.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 664 days since the last release
Last repo commit
First released
Downloads 124,969/month — #11,844 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_admin_env_notice-1.0.1-py2.py3-none-any.whl

Keywords: django-admin-env-notice

Development Status :: 5 - Production/StableFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

django admin environment bannerdistinguish django admin environmentsvisual environment warning djangoproduction staging admin labeldjango admin safety noticeenvironment color banner djangoprevent wrong environment admin
django-adminenvironment-safetyui-enhancement

More Dynamic Content packages

MarkupSafe

MarkupSafe provides a text object that escapes…

permissive · top 100 on PyPI

Jinja2

Jinja2 is a templating engine that renders…

permissive · top 100 on PyPI

soupsieve

Soupsieve is a CSS selector library designed to…

permissive · top 100 on PyPI

Werkzeug

Werkzeug is a WSGI utility library providing…

permissive · top 1,000 on PyPI

Flask

Flask is a lightweight WSGI web application…

permissive · top 1,000 on PyPI

Mako

Mako compiles Python-embedded templates into…

permissive · top 1,000 on PyPI

djangocms-admin-style

Provides styled CSS templates and admin…

permissive · top 15,000 on PyPI

django-better-admin-arrayfield

Provides a list-based widget for Django's…

permissive · top 15,000 on PyPI

django-unfold

Replaces Django's default admin interface with…

permissive · top 5,000 on PyPI

django-colorfield

Adds a color field to Django models with an…

permissive · top 5,000 on PyPI

django-adminplus

Adds custom admin views to Django's admin…

permissive · top 5,000 on PyPI

django-grappelli

Django Grappelli replaces the default Django…

permissive · top 15,000 on PyPI

django-flags

Django-Flags provides a feature flag system for…

permissive · top 15,000 on PyPI

wagtail-modeladmin

Adds Django model administration interfaces to…

permissive · top 15,000 on PyPI

django-admin-interface

Replaces Django's default admin interface with…

permissive · top 15,000 on PyPI

django-object-actions

Adds custom action buttons to Django admin…

permissive · top 5,000 on PyPI