Improve settings hierarchy conciseness
This commit is contained in:
@@ -116,6 +116,7 @@ TEMPLATES = [
|
||||
"django.contrib.auth.context_processors.auth",
|
||||
"django.contrib.messages.context_processors.messages",
|
||||
"core.util.django_settings_export.settings_export",
|
||||
"core.context_processors.settings_hierarchy_nav",
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
82
app/urls.py
82
app/urls.py
@@ -17,8 +17,10 @@ from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.views import LogoutView
|
||||
from django.views.generic import RedirectView
|
||||
from django.urls import include, path
|
||||
from two_factor.urls import urlpatterns as tf_urls
|
||||
from two_factor.views.profile import ProfileView
|
||||
|
||||
from core.views import (
|
||||
ais,
|
||||
@@ -49,21 +51,69 @@ urlpatterns = [
|
||||
path("__debug__/", include("debug_toolbar.urls")),
|
||||
path("", base.Home.as_view(), name="home"),
|
||||
path("admin/", admin.site.urls),
|
||||
path(
|
||||
"account/two_factor/",
|
||||
RedirectView.as_view(pattern_name="security_2fa", permanent=False),
|
||||
),
|
||||
# 2FA login urls
|
||||
path("", include(tf_urls)),
|
||||
path("accounts/signup/", base.Signup.as_view(), name="signup"),
|
||||
path("accounts/logout/", LogoutView.as_view(), name="logout"),
|
||||
# Notifications
|
||||
path(
|
||||
"notifications/page/update/",
|
||||
RedirectView.as_view(pattern_name="notifications_settings", permanent=False),
|
||||
),
|
||||
path(
|
||||
"notifications/<str:type>/update/",
|
||||
notifications.NotificationsUpdate.as_view(),
|
||||
name="notifications_update",
|
||||
),
|
||||
path(
|
||||
"settings/notifications/",
|
||||
notifications.NotificationsUpdate.as_view(),
|
||||
{"type": "page"},
|
||||
name="notifications_settings",
|
||||
),
|
||||
path(
|
||||
"settings/security/",
|
||||
system.SecurityPage.as_view(),
|
||||
system.SecurityPage.as_view(page_mode="encryption"),
|
||||
name="security_settings",
|
||||
),
|
||||
path(
|
||||
"settings/security/encryption/",
|
||||
system.SecurityPage.as_view(page_mode="encryption"),
|
||||
name="encryption_settings",
|
||||
),
|
||||
path(
|
||||
"settings/security/permissions/",
|
||||
system.SecurityPage.as_view(page_mode="permission"),
|
||||
name="permission_settings",
|
||||
),
|
||||
path(
|
||||
"settings/security/permission/",
|
||||
RedirectView.as_view(pattern_name="permission_settings", permanent=False),
|
||||
),
|
||||
path(
|
||||
"settings/security/2fa/",
|
||||
ProfileView.as_view(),
|
||||
name="security_2fa",
|
||||
),
|
||||
path(
|
||||
"settings/accessibility/",
|
||||
system.AccessibilitySettings.as_view(),
|
||||
name="accessibility_settings",
|
||||
),
|
||||
path(
|
||||
"settings/ai/",
|
||||
system.AISettingsPage.as_view(),
|
||||
name="ai_settings",
|
||||
),
|
||||
path(
|
||||
"settings/modules/",
|
||||
system.ModulesSettingsPage.as_view(),
|
||||
name="modules_settings",
|
||||
),
|
||||
path(
|
||||
"settings/system/",
|
||||
system.SystemSettings.as_view(),
|
||||
@@ -115,10 +165,24 @@ urlpatterns = [
|
||||
name="command_routing",
|
||||
),
|
||||
path(
|
||||
"settings/ai-execution/",
|
||||
"settings/ai/traces/",
|
||||
automation.AIExecutionLogSettings.as_view(),
|
||||
name="ai_execution_log",
|
||||
),
|
||||
path(
|
||||
"settings/ai/traces/run/<int:run_id>/",
|
||||
automation.AIExecutionRunDetailView.as_view(),
|
||||
name="ai_execution_run_detail",
|
||||
),
|
||||
path(
|
||||
"settings/ai/traces/run/<int:run_id>/tab/<str:tab_slug>/",
|
||||
automation.AIExecutionRunDetailTabView.as_view(),
|
||||
name="ai_execution_run_detail_tab",
|
||||
),
|
||||
path(
|
||||
"settings/ai-execution/",
|
||||
RedirectView.as_view(pattern_name="ai_execution_log", permanent=False),
|
||||
),
|
||||
path(
|
||||
"settings/translation/",
|
||||
automation.TranslationSettings.as_view(),
|
||||
@@ -500,6 +564,20 @@ urlpatterns = [
|
||||
workspace.AIWorkspaceUpdatePlanMeta.as_view(),
|
||||
name="ai_workspace_mitigation_meta_save",
|
||||
),
|
||||
path(
|
||||
"settings/ai/models/",
|
||||
ais.AIList.as_view(),
|
||||
{"type": "page"},
|
||||
name="ai_models",
|
||||
),
|
||||
path(
|
||||
"ai/models/",
|
||||
RedirectView.as_view(pattern_name="ai_models", permanent=False),
|
||||
),
|
||||
path(
|
||||
"ai/page/",
|
||||
RedirectView.as_view(pattern_name="ai_models", permanent=False),
|
||||
),
|
||||
path(
|
||||
"ai/<str:type>/",
|
||||
ais.AIList.as_view(),
|
||||
|
||||
Reference in New Issue
Block a user