Skip to main content

adminita header

Adminita

A modern, beautiful Django admin theme built with Tailwind CSS v4. Transform your Django admin interface into a sleek, responsive dashboard with dark mode support.

License Python Django Tailwind CSS PyPI

✨ Features

  • 🎨 Modern UI - Clean, professional interface built with Tailwind CSS v4
  • 🌓 Dark Mode - System preference detection with manual toggle
  • 📱 Responsive Design - Works seamlessly on desktop. Responsive navigation and touch-friendly controls for phones and tablets
  • 🎯 Easy Integration - Drop-in replacement for Django's default admin
  • 💾 Form Autosave - Unsaved edits survive a refresh or closed tab, with a Restore/Discard prompt that never overwrites newer changes
  • ⚡ Fast - Optimized CSS with no unnecessary bloat
  • 🔧 Customizable - Easy to customize colors and styling
  • 🆓 Open Source - MIT licensed, free to use and modify

📸 Screenshots

Light Mode

adminita light dashboard

Dark Mode

Dark Mode Dashboard

🚀 Quick Start

Installation

  1. Install via pip (recommended for production):
pip install adminita
  1. Or install from source (for development):
git clone https://github.com/djangify/adminita.git
cd adminita
pip install -r requirements.txt   # demo project dependencies
pip install -e .
python manage.py migrate
python manage.py createsuperuser

The demo project reads optional settings from a .env file (see .env.example); it runs without one for local use.

Configuration

  1. Add to INSTALLED_APPS in your Django settings (must be before django.contrib.admin):
INSTALLED_APPS = [
    "adminita",  # Must be FIRST!
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    # ... your other apps
]
  1. Configure static files:
STATIC_URL = "/static/"
STATIC_ROOT = BASE_DIR / "staticfiles"
  1. Add customization to project urls.py file: Adminita uses Django's built-in admin site customization. Add these lines to your urls.py:
from django.contrib import admin

admin.site.site_header = "Your Site Name"
admin.site.site_title = "Your Site Title" 
admin.site.index_title = "Welcome to Your Site"
  1. Collect static files:
python manage.py collectstatic --noinput
  1. Create the database tables and an admin user (skip if your project already has them):
python manage.py migrate
python manage.py createsuperuser
  1. Run your server:
python manage.py runserver
  1. Visit the admin at http://localhost:8000/admin/

That's it! Your Django admin should now have the Adminita theme applied.

🆕 What's New in 0.2.2

  • Collapsible sidebar. Each section (Shop, Blog, Authentication and so on) now folds and opens. The section you are on is always open, and the others remember how you left them in your browser. Works on desktop and phone.
  • Expand all / Collapse all links at the top of the sidebar.
  • No settings and no template changes are needed. If your project has its own copy of templates/admin/base.html, delete it (or merge the new sidebar_content block) to get the collapsible sidebar.

Upgrading from 0.2.1

pip install --upgrade adminita
python manage.py collectstatic --noinput

What's New in 0.2.1

  • Django 5.2 or newer is now required. Django 4.2, 5.0 and 5.1 have reached end of life and are no longer supported or tested. Supported: Django 5.2 and 6.0.
  • Setup instructions for running the demo project from a clone now work on a clean machine (dependencies, migrate and createsuperuser are included).
  • The demo project reads DEBUG and ALLOWED_HOSTS from a .env file (see .env.example) and defaults to localhost only.
  • Demo dependencies updated to a patched Django 5.2 release; unused demo dependencies removed.
  • New automated tests: JavaScript tests for form autosave (npm test), admin login-flow tests, and a CI check that the published package contains its templates, static files and license.

Upgrading from 0.2.0

pip install --upgrade adminita
python manage.py collectstatic --noinput

No template or settings changes are needed. If your project still runs Django 4.2, 5.0 or 5.1, upgrade Django to 5.2 or newer first, or stay on Adminita 0.2.0 (which no longer receives updates).

What's New in 0.2.0

  • Security fix for the "add related object" popup (XSS via object names)
  • Related-field popups fixed: many-to-many fields keep existing selections, filter_horizontal / filter_vertical receive new items, and raw ID lookups work
  • Change list actions fixed: selection counter, "Select all N across pages" and actions after searching or filtering
  • Safer form autosave with a Restore / Discard prompt
  • Dark mode now follows your system setting until you use the toggle
  • Logout and password change pages now use Adminita's design
  • Tested on Django 4.2 to 6.0

Upgrading from 0.1.x (to 0.2.0)

  1. Upgrade the package and re-collect static files:
pip install --upgrade adminita
python manage.py collectstatic --noinput
  1. If your settings include "adminita.context_processors.admin_app_list" in TEMPLATES, remove it. It's no longer needed and now only raises a deprecation warning.

  2. AlwaysVisibleAdmin and SingletonAdmin now follow Django's model permissions. Staff users who aren't superusers need view (and change) permission on those models to see them. Superusers are not affected.

🎨 Customization

Changing Colors

Adminita uses Tailwind CSS v4's new @theme syntax. To customize colors:

  1. Edit the source CSS at adminita/static/src/input.css:
@theme {
  /* Change primary colors to match your brand */
  --color-primary-500: #10b981; /* Your brand color */
  --color-primary-600: #059669; /* Darker shade */
  --color-primary-700: #047857; /* Even darker */
}
  1. Rebuild the CSS:
cd path/to/adminita
npm install  # If you haven't already
npm run build
  1. Collect static files in your project:
python manage.py collectstatic --noinput

Available Color Variables

--color-primary-50 through --color-primary-950
--color-gray-50 through --color-gray-900
--color-gray-750 (custom for dark mode)

🔧 Utility Classes

Adminita provides utility classes to help with common admin patterns.

AlwaysVisibleAdmin

Ensures models always appear in the admin index, even if the changelist redirects or add is disabled. Viewing and editing still follow Django's normal model permissions:

from adminita.utils import AlwaysVisibleAdmin

@admin.register(MyModel)
class MyModelAdmin(AlwaysVisibleAdmin):
    pass

SingletonAdmin

For models that should only have one instance (like Site Settings). The changelist goes straight to the existing instance, adding is blocked once one exists (or if the user lacks add permission), and deleting is disabled:

from adminita.utils import SingletonAdmin

@admin.register(SiteConfiguration)
class SiteConfigurationAdmin(SingletonAdmin):
    list_display = ['site_name']

🛠️ Development

Setting Up Development Environment

  1. Clone the repository:
git clone https://github.com/djangify/adminita.git
cd adminita
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
pip install -e ".[dev]"   # Adminita itself plus pytest, ruff and black
npm install
  1. Build CSS:
npm run build    # One-time build
npm run watch    # Auto-rebuild on changes
  1. Run the demo project:
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

Project Structure

adminita/
├── adminita/                  # The Django app package
│   ├── static/
│   │   ├── adminita/
│   │   │   ├── adminita-tailwind.css    # Generated CSS (don't edit)
│   │   │   ├── action-fix.css           # Styles for Django's own widget markup
│   │   │   ├── adminita-tailwind.js     # JavaScript for dark mode & mobile menu
│   │   │   └── adminita-autosave.js     # Keeps unsaved form edits (restore/discard banner)
│   │   └── src/
│   │       └── input.css     # Source CSS with Tailwind v4 syntax
│   ├── templates/
│   │   ├── admin/            # Template overrides
│   │   │   ├── base.html
│   │   │   ├── index.html
│   │   │   ├── login.html
│   │   │   ├── change_list.html
│   │   │   └── change_form.html
│   │   └── registration/     # Points Django's logout/password pages at Adminita's versions
│   ├── templatetags/         # adminita_tags (readonly field rendering)
│   ├── utils.py              # AlwaysVisibleAdmin, SingletonAdmin
│   ├── __init__.py
│   └── apps.py
├── config/                    # Django project settings
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── tests/                     # pytest suite
├── manage.py
├── package.json              # Node.js dependencies for Tailwind
├── pyproject.toml            # Python package configuration
└── README.md

Known Limitations

Adminita is usable on mobile, but not yet optimized for it:

  • Complex tables - Very wide tables still require horizontal scrolling
  • Inline formsets - Tabular inlines are cramped; consider using stacked inlines for mobile-heavy use cases
  • Rich text editors - TinyMCE and similar may have their own mobile issues
  • Date/time pickers - Django's default widgets are desktop-focused

Future Improvements (Community PRs Welcome)

  • Card-based table view option for mobile (instead of horizontal scroll)
  • Bottom navigation bar for common actions
  • Pull-to-refresh on list pages
  • Improved inline formset mobile layout
  • Native date/time inputs on mobile ()

📚 Documentation

Tailwind CSS v4 Notes

Adminita uses Tailwind CSS v4, which has a different syntax than v3:

  • Uses @import "tailwindcss" instead of @tailwind directives
  • Theme customization uses @theme {} blocks in CSS
  • More streamlined, CSS-first approach

Template Inheritance

When extending Adminita templates in your own project:

{% extends "admin/base.html" %}

Not adminita/admin/base.html - Django finds templates automatically because adminita is in INSTALLED_APPS.

🤝 Contributing

We welcome contributions! Adminita is an open-source project and we'd love your help making it better. See CONTRIBUTING.md for the full guide (setup, coding standards, PR process) and our Code of Conduct.

Priority Issues

We especially need help with:

  • 📱 Mobile Responsiveness - Testing on various devices
  • ♿ Accessibility - ARIA labels, keyboard navigation, screen reader support
  • 🎨 Additional Themes - Creating alternative color schemes
  • 🧪 Test Coverage - Expanding the test suite
  • 📝 Documentation - Improving guides and examples

📦 Requirements

  • Python 3.10+ (3.12+ for Django 6.0)
  • Django 5.2 or 6.0 (older releases are end-of-life and no longer supported)
  • Node.js (for building CSS during development)
  • npm (for managing Tailwind CSS)

🧪 Testing

pytest                   # Run the Python test suite
npm test                 # Run the JavaScript tests (needs `npm install` first)
ruff check .             # Lint
black --check .          # Formatting

Tests run automatically on every pull request via GitHub Actions across supported Python/Django versions. Manual checks worth doing before submitting a PR: multiple browsers (Chrome, Firefox, Safari, Edge), dark mode toggle, and responsive layout on mobile.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👏 Acknowledgments

💬 Support

Having trouble? Here are some ways to get help:

🗺️ Roadmap

  • Publish to PyPI
  • Fix dark mode toggle functionality
  • Django 6.0 support
  • Add more customization options
  • Create additional color themes
  • Improve accessibility (ARIA labels, keyboard navigation)
  • Expand automated test coverage
  • Create video tutorials
  • Add support for Django inline forms
  • Create a documentation website

⭐ Star History

If you find Adminita useful, please consider giving it a star on GitHub! It helps others discover the project.


Made with ❤️ by a Django enthusiast

Note: This is an open-source project. I appreciate your patience and contributions!

Developer: https://www.todiane.com

Developer LinkedIn: https://linkedin.com/in/todianedev

Buy Me A Tea: https://thanks.dianecorriette.com/

Coffee Always Welcome: https://ko-fi.com/todianedev ❤️

Maintained by Diane Corriette

Metadata

Release files for adminita 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adminita 0.2.2
File Size Uploaded Provenance Actions
adminita-0.2.2.tar.gz 57.9 kB Without provenance Details for adminita-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for adminita 0.2.2
File Interpreter ABI Platform Actions
adminita-0.2.2-py3-none-any.whl Python 3 none any Details for adminita-0.2.2-py3-none-any.whl

Total release size: 123.2 kB

Release files / adminita-0.2.2.tar.gz

Download URL adminita-0.2.2.tar.gz
Size 57.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f45c0aa1a59c3706abcf99d60075f176bb46aff3289d6791490af0f1d17dfb80
BLAKE2b-256 checksum
How to use checksums
841d6111cf5714ff6a65716f89bb4addd74379c4469ffe2072fbd4acb0e8f9f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.10

Release files / adminita-0.2.2-py3-none-any.whl

Download URL adminita-0.2.2-py3-none-any.whl
Size 65.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b36c72544968daaa70553afa2f8f6e03c828bc2943fdf224c43366ecbd61eb05
BLAKE2b-256 checksum
How to use checksums
fa181ef98d4c889c81993bc22ee1bdb71c3aa844666c379f175cc3ca7adeb3eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.10

Security for adminita 0.2.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page