Django Admin Theme Pro

Django Admin Theme Pro · v3.0

Django Admin Theme Pro — Documentation

Version 3.0 | Django 5.x / 6.x | Python 3.14+


Installation

Estimated time: 5 minutes

Requirements

  • Python 3.14+
  • Django 5.x or 6.x
  • No additional pip packages required

Step 1: Copy the theme folder

Unzip the package and copy the admin_theme_pro/ directory into your Django project root (same level as manage.py):

your_project/
├── admin_theme_pro/    <-- place here
│   ├── static/
│   ├── templates/
│   ├── templatetags/
│   ├── context_processors.py
│   ├── views.py
│   ├── apps.py
│   └── __init__.py
├── your_app/
├── manage.py
└── project/
    └── settings.py

Step 2: Add to INSTALLED_APPS

Add 'admin_theme_pro' before 'django.contrib.admin':

INSTALLED_APPS = [
    'admin_theme_pro',           # Must be FIRST
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # ... your apps
]

Order matters. Django uses the first matching template it finds. admin_theme_pro must come before django.contrib.admin so its templates take precedence.

Step 3: Add context processor

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                'admin_theme_pro.context_processors.theme_context',
            ],
        },
    },
]

Step 4: Collect static files (production only)

python manage.py collectstatic

For development (DEBUG=True), Django serves static files automatically.

Step 5: Visit /admin/

python manage.py runserver

Open http://127.0.0.1:8000/admin/ — the theme is active.


Optional: Home Page with Login

To add a branded landing page at / with a login form:

# urls.py
from admin_theme_pro.views import home, logout_view

urlpatterns = [
    path('', home, name='home'),
    path('admin/logout/', logout_view, name='logout'),
    path('admin/', admin.site.urls),
]

Configuration

Via Theme settings

# settings.py
ADMIN_THEME_PRO_SITE_TITLE = "My Company"
ADMIN_THEME_PRO_SITE_HEADER = "My Company Admin"
ADMIN_THEME_PRO_WELCOME_TEXT = "Welcome back"

Via Django settings

from django.contrib import admin

admin.site.site_header = "Acme Corp"        # Top-left text
admin.site.site_title  = "Acme Admin"       # Browser tab
admin.site.index_title = "Control Panel"    # Dashboard h1

Theming

How It Works

localStorage / OS preference
         |
         v
   theme.js (inline anti-FOUC script)
         |
         +-- Adds/removes .dark-mode on <html>
         +-- Adds scheme class (scheme-indigo, scheme-violet, etc.)
         |
         v
   theme.css — CSS custom properties swap

6 Color Schemes

Name Class Accent Color
Indigo (default) scheme-indigo #6366f1
Violet scheme-violet #7c3aed
Teal scheme-teal #0d9488
Rose scheme-rose #e11d48
Amber scheme-amber #d97706
Emerald scheme-emerald #059669

Schemes are selected via header buttons and stored in localStorage key djp-admin-scheme.

CSS Variables

Variable Light Value Used For
--accent #6366f1 Buttons, links, active states
--accent-hover #4f46e5 Button hover
--bg #f0f2f7 Page background
--bg-card #ffffff Cards and modules
--sidebar-bg #ffffff Sidebar background
--header-bg #0f172a Header bar
--border #e2e8f0 All borders
--text #0f172a Primary text
--radius 10px Border radius
--font 'DM Sans' Body font
--font-mono 'JetBrains Mono' Monospace

Changing the Accent Color

.scheme-custom {
  --accent: #your-color;
  --accent-hover: #darker-variant;
  --accent-subtle: rgba(r, g, b, 0.10);
}

Changing Typography

:root {
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'Fira Code', monospace;
}

For offline environments (no Google Fonts):

:root {
  --font: system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'Courier New', monospace;
}

Customisation

Replace the shield icon in CSS:

#branding h1 a::before {
  content: '';
  width: 120px;
  height: 32px;
  background-image: url('/static/your_app/logo.svg');
  background-size: contain;
  background-repeat: no-repeat;
}
:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 56px;
}

Keyboard Shortcuts

  • Ctrl + K — Command palette
  • Ctrl + / — Toggle sidebar
  • Ctrl + Shift + F — Fullscreen

Custom Favicon

Replace admin_theme_pro/static/admin_theme_pro/img/favicon.svg with your own SVG or update base_site.html.

Removing Google Fonts

:root {
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Courier New', monospace;
}

And remove the @import line at the top of theme.css.


Production Checklist

  • DEBUG = False
  • STATIC_ROOT configured
  • python manage.py collectstatic executed
  • Static files served by web server (Nginx, WhiteNoise, S3, etc.)
  • HTTPS enabled

WhiteNoise (simplest option)

pip install whitenoise
MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'whitenoise.middleware.WhiteNoiseMiddleware',
    # ...
]

Troubleshooting

Theme not showing?

  1. Check 'admin_theme_pro' is before 'django.contrib.admin' in INSTALLED_APPS
  2. Check the context processor is in your template settings
  3. Run python manage.py collectstatic

Dark mode flashing on load?

The inline script in base_site.html prevents this. Make sure you haven't removed the extrahead block contents.

Fonts not loading?

The theme loads DM Sans and JetBrains Mono from Google Fonts. Use the offline font settings above for intranet environments.


Pricing

License Price Projects Support Updates
Personal €29 1 project Yes
Multi-Project €87 Up to 5 projects Yes Yes
Unlimited €174 Unlimited projects Yes Yes

Need help? Visit djangozen.com/support

Info

Product: Django Admin Theme Pro

Type: Digital Product

Version: 3.0

Updated: Mar 14, 2026


All Documentation