Custom error pages
This commit is contained in:
parent
f35246c9e2
commit
957344922b
13 changed files with 228 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue