expephalon-chat/core/urls.py
Klaus-Uwe Mitterer a133ea4cb1 A lot of changes:
Prepare for Minio/S3 media storage
Add current FontAwesome
Move statics and templates out of core
Add navigation menu generation
Add name attribute to URLs
Probably many other things I forgot by now
2020-04-07 21:52:10 +02:00

25 lines
No EOL
793 B
Python

from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from core.views import DashboardView
from core.navigation import Navigation
import importlib
urlpatterns = [
path('admin/', DashboardView.as_view(), name="backend"),
]
for module in settings.EXPEPHALON_MODULES:
try:
mou = importlib.import_module(f"{module}.urls")
for url, action, name in mou.ADMIN_URLS:
urlpatterns.append(path(f'admin/modules/{module}/{url}', action, name=f"{module}_{name}"))
except (AttributeError, ModuleNotFoundError):
pass
if "dbsettings" in settings.INSTALLED_APPS:
from core.views import DBSettingsListView
urlpatterns.append(path("admin/dbsettings/", DBSettingsListView.as_view(), name="dbsettings"))