django admin improvement complete

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-15 01:38:41 +00:00
parent cda56f15ba
commit 125489df0f
14 changed files with 526 additions and 68 deletions

View File

@@ -257,6 +257,44 @@ class Igny8AdminSite(UnfoldAdminSite):
'models': [],
})
# Add Reports section with links to all reports
organized_apps.append({
'name': 'Reports & Analytics',
'app_label': '_reports',
'app_url': '#',
'has_module_perms': True,
'models': [
{
'name': 'Revenue Report',
'object_name': 'RevenueReport',
'admin_url': '/admin/reports/revenue/',
'view_only': True,
'perms': {'view': True},
},
{
'name': 'Usage Report',
'object_name': 'UsageReport',
'admin_url': '/admin/reports/usage/',
'view_only': True,
'perms': {'view': True},
},
{
'name': 'Content Report',
'object_name': 'ContentReport',
'admin_url': '/admin/reports/content/',
'view_only': True,
'perms': {'view': True},
},
{
'name': 'Data Quality Report',
'object_name': 'DataQualityReport',
'admin_url': '/admin/reports/data-quality/',
'view_only': True,
'perms': {'view': True},
},
],
})
for group_name, group_config in custom_groups.items():
group_models = []