1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Custom error pages

This commit is contained in:
Yohann D'ANELLO
2020-04-25 19:29:18 +02:00
parent f35246c9e2
commit 957344922b
13 changed files with 228 additions and 13 deletions

View File

@ -5,6 +5,7 @@ from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from django.views.defaults import bad_request, permission_denied, page_not_found, server_error
from django.views.generic import RedirectView
from member.views import CustomLoginView
@ -45,3 +46,11 @@ if "debug_toolbar" in settings.INSTALLED_APPS:
urlpatterns = [
path('__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
handler400 = bad_request
handler403 = permission_denied
# Only displayed in production, when debug mode is set to False
handler404 = page_not_found
handler500 = server_error