Metadata-Version: 2.4
Name: django-admin-env-badge
Version: 0.1.0
Summary: Visual environment indicators for the Django admin header to distinguish Local, Dev, Stage, and Production.
Project-URL: Homepage, https://github.com/Moataz0000/django-admin-env-badge
Project-URL: Repository, https://github.com/Moataz0000/django-admin-env-badge
Project-URL: Issues, https://github.com/Moataz0000/django-admin-env-badge/issues
Author-email: Moataz Fawzy <motazfawzy73@gmail.com>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.13
Requires-Dist: django>=6.0.1
Description-Content-Type: text/markdown

# 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)

![Staging badge](src/screen_shots/1.png)

**Development** (dark mode)

![Development badge](src/screen_shots/2.png)

**Production** (light mode)

![Production badge](src/screen_shots/3.png)

## Installation

```bash
pip install django-admin-env-badge
```

## Setup

### 1. Add the app to `INSTALLED_APPS`

Place it **before** `django.contrib.admin`:

```python
INSTALLED_APPS = [
    "django_admin_env_badge",
    "django.contrib.admin",
    # ...
]
```

### 2. Add the context processor

```python
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

```python
# settings.py

ADMIN_ENV_NAME = "Production"
ADMIN_ENV_COLOR = "#0003a6"
ADMIN_ENV_ICON = "⚡"
```


