mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #25695 -- Added template_name parameter to csrf_failure() view.
This commit is contained in:
parent
20d2778597
commit
16945f0e9c
4 changed files with 55 additions and 5 deletions
|
@ -385,6 +385,15 @@ where ``reason`` is a short message (intended for developers or logging, not for
|
|||
end users) indicating the reason the request was rejected. See
|
||||
:doc:`/ref/csrf`.
|
||||
|
||||
``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.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ``template_name`` parameter and the behavior of searching for a template
|
||||
called ``403_csrf.html`` were added to ``csrf_failure()``.
|
||||
|
||||
.. setting:: CSRF_HEADER_NAME
|
||||
|
||||
CSRF_HEADER_NAME
|
||||
|
|
|
@ -114,7 +114,9 @@ Cache
|
|||
CSRF
|
||||
^^^^
|
||||
|
||||
* ...
|
||||
* The default :setting:`CSRF_FAILURE_VIEW`, ``views.csrf.csrf_failure()`` now
|
||||
accepts an optional ``template_name`` parameter, defaulting to
|
||||
``'403_csrf.html'``, to control the template used to render the page.
|
||||
|
||||
Database backends
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue