Visual environment indicators for the Django admin header to distinguish Local, Dev, Stage, and Production.
Project description
django-admin-env-badge
A simple Django app that displays an environment badge in the Django admin — so you always know whether you're on Production, Staging, or Development.
Screenshots
Staging (light mode)
Development (dark mode)
Production (light mode)
Installation
pip install django-admin-env-badge
Setup
1. Add the app to INSTALLED_APPS
Place it before django.contrib.admin:
INSTALLED_APPS = [
"django_admin_env_badge",
"django.contrib.admin",
# ...
]
2. Add the context processor
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"OPTIONS": {
"context_processors": [
# ... default processors
"django_admin_env_badge.context_processors.env_badge",
],
},
},
]
Configuration
Add these settings to your settings.py:
| Setting | Type | Default | Description |
|---|---|---|---|
ADMIN_ENV_NAME |
str |
None |
The environment name to display. Badge is hidden when not set. |
ADMIN_ENV_COLOR |
str |
"#22FE00" |
Badge background color (any valid CSS color). |
ADMIN_ENV_ICON |
str |
"" |
Optional emoji shown before the name. ⚙️, 🚀, 🛠️ |
Example
# settings.py
ADMIN_ENV_NAME = "Production"
ADMIN_ENV_COLOR = "#0003a6"
ADMIN_ENV_ICON = "⚡"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_admin_env_badge-0.1.0.tar.gz.
File metadata
- Download URL: django_admin_env_badge-0.1.0.tar.gz
- Upload date:
- Size: 328.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fe17f992a1b2e187176adf4a2455e37cc82f7891d06910566670e229b412721
|
|
| MD5 |
6200a6c776eecc3c41176bc144316217
|
|
| BLAKE2b-256 |
3ef8996fac050c1fd20f24951939bb6420bdf6717e1166a247219243664ea444
|
File details
Details for the file django_admin_env_badge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_admin_env_badge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
620005d21d189fc9b39ce52af230442e9fc57b3651fd52c81510ac8c12843370
|
|
| MD5 |
302f7f3697b5879bf807e2dbd01ae3a9
|
|
| BLAKE2b-256 |
c8eef429b9b90789266f12e263a2940578b6ca5791e6185f10e9e4a56a476665
|