Django Admin Notice
Show a floating notice banner above the Django admin interface. Particularly useful for indicating the current deployment environment.
Installation
Install django-admin-notice by running:
pip install django-admin-notice
Add admin_notice to your INSTALLED_APPS somewhere before django.contrib.admin.
INSTALLED_APPS = [
"admin_notice", # <-- Add this somewhere before "django.contrib.admin"
"django.contrib.admin",
# ... other apps
]
Add admin_notice.context_processors.notice to the templates context_processors.
Having django.template.context_processors.request is required as well.
TEMPLATES = [
{
"OPTIONS": {
"context_processors": [
"django.template.context_processors.request", # <-- have this
"admin_notice.context_processors.notice", # <-- Add this
# ... other context processors
]
},
},
]
Settings
Set the ADMIN_NOTICE_TEXT to the text you want to show above the admin interface.
No message is shown if this setting is missing or empty.
ADMIN_NOTICE_TEXT = "Production environment"
Optionally specify a custom text color and background for your notice.
The default text color is white and the default background red.
ADMIN_NOTICE_TEXT_COLOR = "white"
ADMIN_NOTICE_BACKGROUND = "red"
Furthermore, optional dark theme color variants can be specified. The dark theme colors default to the non-dark theme colors.
ADMIN_NOTICE_TEXT_COLOR_DARK = "#f2f2f2"
ADMIN_NOTICE_BACKGROUND_DARK = "#FA8072"
Tips
It's a common use case to indicate the projects deployment environment.
The following configuration shows how to obtain the django-admin-notice
configuration from environment variables and how to configure a fallback.
from os import environ
ADMIN_NOTICE_TEXT = environ.get("ADMIN_NOTICE_TEXT", "Local environment")
ADMIN_NOTICE_TEXT_COLOR = environ.get("ADMIN_NOTICE_TEXT_COLOR", "white")
ADMIN_NOTICE_BACKGROUND = environ.get("ADMIN_NOTICE_BACKGROUND", "green")
Example project
Take a look at our Django example project under tests/project. You can run it by executing these commands:
uv syncuv run tests/project/manage.py migrateuv run tests/project/manage.py createsuperuseruv run tests/project/manage.py runserver
Metadata
Release files for django-admin-notice 4.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_admin_notice-4.0.0.tar.gz | 4.5 kB | With provenance | Details for django_admin_notice-4.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_admin_notice-4.0.0-py3-none-any.whl | Python 3 | none | any | Details for django_admin_notice-4.0.0-py3-none-any.whl |
Total release size: 10.5 kB
Release files / django_admin_notice-4.0.0.tar.gz
| Download URL | django_admin_notice-4.0.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bd1dd44d13ea33bfe87944e550533ec24adb9db7bc524836d4b58701051154b
|
|
BLAKE2b-256 checksum How to use checksums |
6b5a496ae6e7a7c22db9eaf0320418cc3c2a798b4f97c9333c2af2881c8fe263
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / django_admin_notice-4.0.0-py3-none-any.whl
| Download URL | django_admin_notice-4.0.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c9183f4fb0570dc6aeea4a3e828dc8433678fdb82e2b718dbbed888d274d8c9
|
|
BLAKE2b-256 checksum How to use checksums |
c747b91345b92460722a45cf96d7337b38cb084fe5cc15aaeb3ea00ddfd369d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for django-admin-notice 4.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for django_admin_notice-4.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.