Skip to main content

A beautiful, modern, fully redesigned Django admin template with RTL support, theming, and offline assets.

Project description

Django Simorgh

A beautiful, modern, fully redesigned Django admin interface.

Django Simorgh replaces the default Django admin UI with a complete custom design: dark sidebar, collapsible app groups, responsive tables, modern forms, RTL layout, 9 color themes, light/dark mode, and all assets bundled — no CDN required.


Installation

pip install django-simorgh

Django Configuration

1. Add to INSTALLED_APPS

django_simorgh must appear before your project apps and before django.contrib.admin so its custom model Meta options are registered before models are imported:

INSTALLED_APPS = [
    "django_simorgh",          # ← MUST be before django.contrib.admin
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    # ... your apps
]

2. Add context processor

TEMPLATES = [
    {
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        "DIRS": [],
        "APP_DIRS": True,
        "OPTIONS": {
            "context_processors": [
                "django.template.context_processors.debug",
                "django.template.context_processors.request",   # required
                "django.contrib.auth.context_processors.auth",
                "django.contrib.messages.context_processors.messages",
                "django_simorgh.context_processors.simorgh_context",  # ← add this
            ],
        },
    },
]

3. Collect static files

python manage.py collectstatic

Theme Color Configuration

# settings.py
DJANGO_ADMIN_THEME_COLOR = "green"   # default

Available values: green, blue, red, yellow, black, purple, orange, pink, navy


Branding, Logo, and Favicon Configuration

DJANGO_ADMIN_SITE_HEADER = "My Admin Panel"   # default: "Simorgh Admin"
DJANGO_ADMIN_LOGO        = "path/to/logo.png"
DJANGO_ADMIN_FAVICON     = "path/to/favicon.ico"

If logo or favicon are not set, the bundled default assets are used automatically.


Model Icon Configuration

Option 1 — Model Meta (recommended)

from django.db import models

class Product(models.Model):
    name = models.CharField(max_length=120)

    class Meta:
        simorgh_icon = "fa-solid fa-box"
        simorgh_app_icon = "fa-solid fa-store"

simorgh_icon controls the model icon. simorgh_app_icon can be defined on any model in the app and controls the sidebar app-group icon.

Because these are custom Django Meta options, keep django_simorgh before your own apps in INSTALLED_APPS.

Option 2 — Per-ModelAdmin

from django.contrib import admin
from .models import Product

@admin.register(Product)
class ProductAdmin(admin.ModelAdmin):
    icon = "fa-solid fa-box"   # any Font Awesome 6 Free class string

Option 3 — Via settings

DJANGO_ADMIN_ICONS = {
    "shop": {
        "_app_icon": "fa-solid fa-store",   # icon for the app group in the sidebar
        "Product":   "fa-solid fa-box",
        "Category":  "fa-solid fa-tag",
        "Order":     "fa-solid fa-receipt",
    },
    "auth": {
        "_app_icon": "fa-solid fa-shield-halved",
        "User":      "fa-solid fa-user",
        "Group":     "fa-solid fa-users",
    },
}

Keys: app_label (outer), ModelName / _app_icon (inner).

Resolution order:

  1. Model Meta.simorgh_icon
  2. ModelAdmin.icon attribute
  3. DJANGO_ADMIN_ICONS settings dict
  4. Built-in defaults for auth, admin, contenttypes, etc.
  5. Generic fallback fa-solid fa-circle-dot

RTL Support

Set LANGUAGE_CODE to a RTL language and Django's LANGUAGE_BIDI will be True automatically. The template uses this to set dir="rtl" on the <html> element, which flips the sidebar, navbar, and tables.

Font selection is handled entirely by CSS unicode-range — no settings needed:

  • Latin/English characters → Sniglet
  • Arabic/Persian characters → Vazirmatn
LANGUAGE_CODE = "fa-ir"   # RTL layout + correct fonts — no extra config needed

License

MIT — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_simorgh-1.2.2.tar.gz (657.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_simorgh-1.2.2-py3-none-any.whl (660.7 kB view details)

Uploaded Python 3

File details

Details for the file django_simorgh-1.2.2.tar.gz.

File metadata

  • Download URL: django_simorgh-1.2.2.tar.gz
  • Upload date:
  • Size: 657.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for django_simorgh-1.2.2.tar.gz
Algorithm Hash digest
SHA256 cf9b3d2392135768aa41a571cae722c6f8d5d2574261d29c0e111d5e3bd1aaf5
MD5 ee84b4e8ec8dbe01f179d499d97a90fd
BLAKE2b-256 9e4d42bd64f1286033039e357ce91f2662ec8222dd66d7170de0dcd7931bcc77

See more details on using hashes here.

File details

Details for the file django_simorgh-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: django_simorgh-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 660.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for django_simorgh-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 038d2ec06088c274bbf59854e87f7167912f3b751e5398ca3afb594e1b7ec51b
MD5 25e1b3f0af58fa88c8469dead1cdb707
BLAKE2b-256 867186552b77c88da0dc7863d5e85488c2a698459ec0b6cda2368164a65657a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page