Skip to main content

Visually distinguish environments in Django Admin

Project description


Package Version Build Status Code Coverage

Visually distinguish environments in Django Admin. Based on great advice from post: 5 ways to make Django Admin safer by hakibenita.


  • Python 2.7, 3.4+
  • Django 1.9+


Install django-admin-env-notice::

pip install django-admin-env-notice

Add it to your INSTALLED_APPS before django.contrib.admin:


Add context processor:

        "OPTIONS": {
            "context_processors": [

Set label and color for current environment:

ENVIRONMENT_NAME = "Production server"

Override django admin selector if necessary (default: body), e.g: grappelli:


Optionally, set the environment banner to float over instead of being fixed to the top:


You can also set the text color (default: white) by setting:



Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox


Tools used in rendering this package:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-admin-env-notice, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size django_admin_env_notice-0.4-py2.py3-none-any.whl (5.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-admin-env-notice-0.4.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page