1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

updated position of the documentation

This commit is contained in:
Chaitanya Rahalkar 2024-12-20 10:40:53 -06:00
parent eb94b3f679
commit 9a2d688acd
2 changed files with 6 additions and 7 deletions

View File

@ -87,6 +87,12 @@ MRO is an acronym for Method Resolution Order.
Performs key view initialization prior to :meth:`dispatch`. Performs key view initialization prior to :meth:`dispatch`.
Sets up three key instance attributes:
* ``self.request`` - The current request object
* ``self.args`` - Positional arguments captured from the URL pattern
* ``self.kwargs`` - Keyword arguments captured from the URL pattern
If overriding this method, you must call ``super()``. If overriding this method, you must call ``super()``.
.. method:: dispatch(request, *args, **kwargs) .. method:: dispatch(request, *args, **kwargs)

View File

@ -330,13 +330,6 @@ various useful things are stored on ``self``; as well as the request
(``self.request``) this includes the positional (``self.args``) and name-based (``self.request``) this includes the positional (``self.args``) and name-based
(``self.kwargs``) arguments captured according to the URLconf. (``self.kwargs``) arguments captured according to the URLconf.
These attributes are set up by the view's ``setup()`` method, which is called at
the beginning of the view processing. The ``setup()`` method sets:
* ``self.request`` - The current request object
* ``self.args`` - Positional arguments captured from the URL pattern
* ``self.kwargs`` - Keyword arguments captured from the URL pattern
Here, we have a URLconf with a single captured group:: Here, we have a URLconf with a single captured group::
# urls.py # urls.py