[Docs] Clarify behavior of View.http_method_not_allowed default implementation

This commit is contained in:
Zubair Hassan 2025-11-16 17:57:46 +05:00
parent 5c60763561
commit 3ca6c60636

View file

@ -113,8 +113,14 @@ ancestor classes are documented under the section title of **Ancestors
If the view was called with an HTTP method it doesn't support, this
method is called instead.
The default implementation returns ``HttpResponseNotAllowed`` with a
list of allowed methods in plain text.
The default implementation returns ``HttpResponseNotAllowed`` with
status code ``405 Method Not Allowed``.
.. note::
Django sets the list of allowed HTTP methods in the ``Allow``
response header, and the response content is empty.
.. method:: options(request, *args, **kwargs)