14 lines
422 B
Python
14 lines
422 B
Python
import importlib
|
|
|
|
from django.conf import settings
|
|
from django.urls import path
|
|
|
|
URLPATTERNS = []
|
|
|
|
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
|