schon/evibes/settings/unfold.py
Egor fureunoir Gorbunov 43dc556063 Features: 1) Migrate from Jazzmin to django-unfold for admin UI;
Fixes: 1) Remove deprecated Jazzmin configuration and replace with unfold dependencies; 2) Update DRF API title to use new PROJECT_NAME; 3) Fix import order and remove unused imports in core/viewsets.py;

Extra: 1) Add PROJECT_NAME to base settings; 2) Update INSTALLED_APPS to include unfold-related apps; 3) Clean up unused config references.
2025-11-15 01:38:14 +03:00

28 lines
1.2 KiB
Python

"""django-unfold configuration.
This module defines branding for the Django admin using django-unfold.
It intentionally avoids database-backed configuration (e.g., Constance)
so that it is safe during initial migrations and in all environments.
"""
from evibes.settings.base import PROJECT_NAME
# See django-unfold documentation for all available options.
# Only minimal, production-safe branding is configured here.
UNFOLD = {
# Text shown in the browser title bar and in the admin header
"SITE_TITLE": f"{PROJECT_NAME} Admin",
"SITE_HEADER": PROJECT_NAME,
# Optional URL the header/brand links to (leave default admin index)
# "SITE_URL": "/admin/",
# Logos and favicon served via Django staticfiles
# Files are expected at: engine/core/static/logo.png, favicon.ico, favicon.png
# Refer to them by their static URL path (relative), no leading slash.
"SITE_LOGO": "logo.png",
# If you use a different logo for dark theme, set SITE_LOGO_DARK
# Otherwise Unfold will reuse SITE_LOGO
# "SITE_LOGO_DARK": "logo.png",
"SITE_ICON": "favicon.ico",
# Sidebar behavior, search etc. (keep defaults minimal)
# Unfold automatically respects user OS light/dark theme; no forcing here.
}