You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# handler400 – See django.conf.urls.handler400.# handler403 – See django.conf.urls.handler403.# handler404 – See django.conf.urls.handler404.# handler500 – See django.conf.urls.handler500.# e.g.:# handler400 = 'mysite.views.my_custom_bad_request_view'# handler403 = 'mysite.views.my_custom_permission_denied_view'# handler404 = 'mysite.views.my_custom_page_not_found_view'# handler500 = 'mysite.views.my_custom_error_view'
In project/base/views/errors.py
# CSRF_FAILURE_VIEW# Default: 'django.views.csrf.csrf_failure'## A dotted path to the view function to be used when an incoming request is rejected by the CSRF protection. The# function should have this signature:## def csrf_failure(request, reason=""):# ...## where reason is a short message (intended for developers or logging, not for end users) indicating the reason the# request was rejected. It should return an `HttpResponseForbidden`.## `django.views.csrf.csrf_failure()` accepts an additional `template_name` parameter that defaults to '403_csrf.html'.# If a template with that name exists, it will be used to render the page.
The text was updated successfully, but these errors were encountered:
Original report by Edward Bridges (Bitbucket: ebridges, GitHub: ebridges).
In
project/base/urls.py
:In
project/base/views/errors.py
The text was updated successfully, but these errors were encountered: