Support form #115

Merged
rixx merged 4 commits from 53-support-form into main 2025-06-23 09:34:42 +00:00
2 changed files with 16 additions and 16 deletions
Showing only changes of commit 55c64d74ff - Show all commits

View file

@ -1,4 +1,3 @@
from django.conf import settings
from django.urls import include, path
from django.views.generic import RedirectView
@ -70,18 +69,4 @@ urlpatterns = [
),
),
path("", RedirectView.as_view(pattern_name="frontend:profile"), name="index"),
# Error page URLs available in all environments
path(
"error404/",
views.custom_404,
{"exception": Exception("Test 404")},
name="error_404",
),
path(
"error403/",
views.custom_403,
{"exception": Exception("Test 403")},
name="error_403",
),
path("error500/", views.custom_500, name="error_500"),
]

View file

@ -6,7 +6,7 @@ from django.urls import path
from django.urls.conf import include
from django.utils.translation import gettext_lazy as _
from servala.frontend import urls
from servala.frontend import urls, views
admin.site.site_title = _("Servala Admin")
admin.site.site_header = _("Servala Management")
@ -26,6 +26,21 @@ urlpatterns = [
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += [
path(
"error404/",
views.custom_404,
{"exception": Exception("Test 404")},
name="error_404",
),
path(
"error403/",
views.custom_403,
{"exception": Exception("Test 403")},
name="error_403",
),
path("error500/", views.custom_500, name="error_500"),
]
# Custom error handlers
handler404 = "servala.frontend.views.custom_404"