dsffdsdsf

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-14 22:49:24 +00:00
parent f637f700eb
commit 78f71558ed
4 changed files with 38 additions and 12 deletions

View File

@@ -21,16 +21,15 @@ class Igny8AdminSite(UnfoldAdminSite):
index_title = 'IGNY8 Administration'
def get_urls(self):
"""Get admin URLs - dashboard available at /admin/dashboard/ but not default"""
"""Get admin URLs with dashboard available at /admin/dashboard/"""
from django.urls import path
from .dashboard import admin_dashboard
urls = super().get_urls()
# Dashboard is available at /admin/dashboard/ if needed, but not redirecting by default
# from django.urls import path
# from .dashboard import admin_dashboard
# custom_urls = [
# path('dashboard/', self.admin_view(admin_dashboard), name='dashboard'),
# ]
# return custom_urls + urls
return urls
custom_urls = [
path('dashboard/', self.admin_view(admin_dashboard), name='dashboard'),
]
return custom_urls + urls
def each_context(self, request):
"""
@@ -184,6 +183,15 @@ class Igny8AdminSite(UnfoldAdminSite):
# regardless of app_label parameter (for consistent sidebar on all pages)
organized_apps = []
# Add Dashboard link as first item
organized_apps.append({
'name': '📊 Dashboard',
'app_label': '_dashboard',
'app_url': '/admin/dashboard/',
'has_module_perms': True,
'models': [],
})
for group_name, group_config in custom_groups.items():
group_models = []