mirror of
https://github.com/django/django.git
synced 2025-11-19 11:15:44 +00:00
[Docs] Clarify behavior of View.http_method_not_allowed default implementation
This commit is contained in:
parent
2acee1e68b
commit
e7487f6eb4
1 changed files with 4 additions and 4 deletions
|
|
@ -113,11 +113,11 @@ ancestor classes are documented under the section title of **Ancestors
|
||||||
If the view was called with an HTTP method it doesn't support, this
|
If the view was called with an HTTP method it doesn't support, this
|
||||||
method is called instead.
|
method is called instead.
|
||||||
|
|
||||||
The default implementation returns ``HttpResponseNotAllowed`` with status code **405 Method Not Allowed**.
|
The default implementation returns ``HttpResponseNotAllowed`` with
|
||||||
|
status code **405 Method Not Allowed**.
|
||||||
|
|
||||||
**Note:** The response **does not include the allowed methods in the body**.
|
**Note:** Django sets the list of allowed HTTP methods in the ``Allow``
|
||||||
Instead, Django sets the list of allowed HTTP methods in the ``Allow`` response header,
|
response header, and the response content is empty.
|
||||||
and the response content is empty.
|
|
||||||
|
|
||||||
.. method:: options(request, *args, **kwargs)
|
.. method:: options(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue