Skip to main content

django3-dash

A modern Django admin dashboard built with DaisyUI and Tailwind CSS.

Django Python License PyPI


Features

  • 🎨 Modern UI — DaisyUI components with Tailwind CSS
  • 🌓 Dark Mode — Built-in theme selector with multiple DaisyUI themes
  • 🎯 Custom Theme Colors — Admin UI to override every color (primary, secondary, neutral, base, semantic)
  • 📊 Dashboard Widgets — Charts, stats, recent items (Bar, Line, Pie, Doughnut, etc.)
  • 🗂️ Tabbed Inlines & Fieldsets — Organize admin forms with navigation tabs
  • 🌐 RTL Support — Full Arabic, Farsi, and right-to-left language support
  • 🔧 Highly Configurable — Reorder apps, add icons, hide apps from sidebar
  • 📱 Responsive — Mobile-friendly sidebar and layout

Quick Start

Installation

pip install django3-dash

Settings

Add to INSTALLED_APPS in your settings.py:

INSTALLED_APPS = [
    "django_dash",
    "django.contrib.admin",
    "django.contrib.humanize",
    "django.contrib.contenttypes",
    # ... your apps
]

Run migrations (for DashboardWidget and ThemeConfig models):

python manage.py migrate django_dash

Configuration

All settings are optional. Configure via DASH_SETTINGS in settings.py:

Branding

DASH_SETTINGS = {
    "SITE_TITLE": "My Admin",               # Browser tab title
    "SITE_HEADER": "Administration",        # Header in admin
    "INDEX_TITLE": "Welcome back!",         # Dashboard greeting
    "SITE_LOGO": "/static/logo.svg",        # Custom logo URL
}

Theme Selector

DASH_SETTINGS = {
    "DEFAULT_THEME": "corporate",           # Force a single theme
    "DEFAULT_THEME_DARK": "dim",            # Separate theme for dark mode
    "SHOW_THEME_SELECTOR": True,            # Show/hide theme picker dropdown
    "THEME_LIST": [                         # Available themes
        {"name": "Light", "value": "light"},
        {"name": "Dark", "value": "dark"},
        {"name": "Corporate", "value": "corporate"},
    ],
}

App Sidebar

DASH_SETTINGS = {
    "APPS_REORDER": {
        "auth": {
            "icon": "fa-solid fa-lock",
            "name": "Authentication",
            "hide": False,
            "divider_title": "Security",
        },
        "polls": {
            "icon": "fa-solid fa-square-poll-vertical",
            "priority": 10,              # Higher = appears first
        },
    },
}

You can also set icon, divider_title, priority, and hide directly on your AppConfig:

class PollsConfig(AppConfig):
    name = "polls"
    icon = "fa-solid fa-square-poll-vertical"
    divider_title = "Content"
    priority = 5

Extra Assets

DASH_SETTINGS = {
    "EXTRA_STYLES": ["https://example.com/custom.css"],
    "EXTRA_SCRIPTS": ["https://example.com/custom.js"],
    "SIDEBAR_FOOTNOTE": "v2.0.0",
    "DONT_SUPPORT_ME": False,            # Hide GitHub link in sidebar
    "LOAD_FULL_STYLES": False,           # Load full DaisyUI (needed for custom themes)
}

Dashboard

DASH_SETTINGS = {
    "SHOW_SIDEBAR": True,
    "SHOW_KEY_METRICS": True,
    "SHOW_RECENT_ACTIVITY": True,
    "SHOW_WORKSPACE": True,
    "ENABLE_CHART_ANIMATIONS": True,
    "CHART_ANIMATION_DURATION": 800,     # milliseconds
    "LIST_PER_PAGE": 20,
    "SHOW_CHANGELIST_FILTER": False,     # Auto-open filter sidebar
}

Static Theme Override (no admin UI)

If you prefer hardcoding colors without the admin interface:

DASH_SETTINGS = {
    "CUSTOM_THEME_COLORS": {
        "primary": "#4f46e5",
        "primary-focus": "#4338ca",
        "secondary": "#0ea5e9",
        "neutral": "#1e293b",
        "base-100": "#ffffff",
        "base-200": "#f1f5f9",
        "base-300": "#e2e8f0",
        "base-content": "#0f172a",
    },
}

Accepted CSS color formats: hex (#4f46e5), oklch (oklch(0.42 0.19 265)), rgb, hsl.


Custom Theme Colors (Admin UI)

New in 0.4.0 — Manage theme colors from the Django admin panel.

After running migrations, a Theme Colors entry appears under the Dashboard section in admin.

How it works

  1. Navigate to Dashboard → Theme Colors in the admin sidebar
  2. Toggle Enable custom theme ON
  3. Pick colors for any of the 21 DaisyUI color slots:
    • Brand — Primary, Secondary, Accent (and their focus/content variants)
    • Neutral — Neutral (and focus/content)
    • Base / Background — base-100, base-200, base-300, base-content
    • Semantic — Info, Success, Warning, Error
  4. Click Save

Colors you leave empty will fall through to the active DaisyUI theme's defaults.

Reset

Click Reset to Default to clear all overrides and disable the custom theme.

Live Preview

Changes take effect immediately on save — refresh any admin page to see your new colors.


Dashboard Widgets

Create dynamic charts and stats for your admin dashboard home page.

Available Chart Types

Type Description
bar Vertical bar chart
line Line chart
pie Pie chart
doughnut Doughnut chart
polar Polar area chart
radar Radar chart
number Large stat counter
recent Recent items list

Usage

  1. Go to Dashboard → Dashboard widgets in admin
  2. Choose a Model (any registered model)
  3. Pick a Chart Type
  4. For time-based charts, set a Date Field (e.g. created_at) and Group By (day/week/month/year)
  5. For aggregate charts, set Aggregate (count/sum/avg/max/min) and optional Aggregate Field
  6. Static charts: fill Custom Labels and Custom Data (one per line)

Tabbed Interface

Tabbed Inlines

from django_dash.mixins import NavTabMixin

class ChoiceInline(admin.TabularInline, NavTabMixin):
    model = Choice
    extra = 1

@admin.register(Poll)
class PollAdmin(admin.ModelAdmin):
    inlines = [ChoiceInline]

Tabbed Fieldsets

@admin.register(User)
class UserAdmin(admin.ModelAdmin):
    fieldsets = (
        (None, {"fields": ("username", "password")}),
        ("Profile", {
            "fields": ("first_name", "last_name", "email"),
            "classes": ("navtab",),   # ← Creates a tab
        }),
        ("Permissions", {
            "fields": ("is_active", "is_staff"),
            "classes": ("navtab",),
        }),
    )

Language Switching

# urls.py
urlpatterns = [
    path("i18n/", include("django.conf.urls.i18n")),
    # ...
]

# settings.py
MIDDLEWARE = [
    "django.middleware.locale.LocaleMiddleware",
    # ...
]

LANGUAGES = [
    ("en", "English"),
    ("fa", "فارسی"),
    ("ar", "العربية"),
]

License

MIT License. See LICENSE.


Metadata

Release files for django3-dash 2.0.4

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

Source distribution (sdist)

Source distribution for django3-dash 2.0.4
File Size Uploaded Provenance Actions
django3_dash-2.0.4.tar.gz 2.3 MB Without provenance Details for django3_dash-2.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django3-dash 2.0.4
File Interpreter ABI Platform Actions
django3_dash-2.0.4-py3-none-any.whl Python 3 none any Details for django3_dash-2.0.4-py3-none-any.whl

Total release size: 4.8 MB

Release files / django3_dash-2.0.4.tar.gz

Download URL django3_dash-2.0.4.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
f07223294d92f24e81469de77b11b0f090381f75d040554fde7573846cb90c94
BLAKE2b-256 checksum
How to use checksums
a45f084d409797bc423a5a32e6b866158587ec90e98b0312eb6a1b9f0a7dd371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.3

Release files / django3_dash-2.0.4-py3-none-any.whl

Download URL django3_dash-2.0.4-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7a4bf7ba63f0b8596b7dc15959db9b5cfc07133d4535f98e7a31c045388f8646
BLAKE2b-256 checksum
How to use checksums
8082b710f33d85c1824d63d44f56ddc0731f8cf5eea2ea19cd7896558b7c33bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.3

Security for django3-dash 2.0.4

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