mirror of
https://github.com/django/django.git
synced 2025-08-23 18:29:12 +00:00
[2.1.x] Refs #24733 -- Documented arguments for custom error views.
Backport of 49f97b645fb1716cf69177558c41cf650a701eed from master
This commit is contained in:
parent
5f62efb5c8
commit
0d8f26f320
@ -165,8 +165,8 @@ that should be called if the HTTP client has sent a request that caused an error
|
|||||||
condition and a response with a status code of 400.
|
condition and a response with a status code of 400.
|
||||||
|
|
||||||
By default, this is :func:`django.views.defaults.bad_request`. If you
|
By default, this is :func:`django.views.defaults.bad_request`. If you
|
||||||
implement a custom view, be sure it returns an
|
implement a custom view, be sure it accepts ``request`` and ``exception``
|
||||||
:class:`~django.http.HttpResponseBadRequest`.
|
arguments and returns an :class:`~django.http.HttpResponseBadRequest`.
|
||||||
|
|
||||||
``handler403``
|
``handler403``
|
||||||
==============
|
==============
|
||||||
@ -178,8 +178,8 @@ that should be called if the user doesn't have the permissions required to
|
|||||||
access a resource.
|
access a resource.
|
||||||
|
|
||||||
By default, this is :func:`django.views.defaults.permission_denied`. If you
|
By default, this is :func:`django.views.defaults.permission_denied`. If you
|
||||||
implement a custom view, be sure it returns an
|
implement a custom view, be sure it accepts ``request`` and ``exception``
|
||||||
:class:`~django.http.HttpResponseForbidden`.
|
arguments and returns an :class:`~django.http.HttpResponseForbidden`.
|
||||||
|
|
||||||
``handler404``
|
``handler404``
|
||||||
==============
|
==============
|
||||||
@ -190,8 +190,8 @@ A callable, or a string representing the full Python import path to the view
|
|||||||
that should be called if none of the URL patterns match.
|
that should be called if none of the URL patterns match.
|
||||||
|
|
||||||
By default, this is :func:`django.views.defaults.page_not_found`. If you
|
By default, this is :func:`django.views.defaults.page_not_found`. If you
|
||||||
implement a custom view, be sure it returns an
|
implement a custom view, be sure it accepts ``request`` and ``exception``
|
||||||
:class:`~django.http.HttpResponseNotFound`.
|
arguments and returns an :class:`~django.http.HttpResponseNotFound`.
|
||||||
|
|
||||||
``handler500``
|
``handler500``
|
||||||
==============
|
==============
|
||||||
|
Loading…
x
Reference in New Issue
Block a user