From 9a2d688acddfcae8719eafa28988ef16930ec7bf Mon Sep 17 00:00:00 2001 From: Chaitanya Rahalkar Date: Fri, 20 Dec 2024 10:40:53 -0600 Subject: [PATCH] updated position of the documentation --- docs/ref/class-based-views/base.txt | 6 ++++++ docs/topics/class-based-views/generic-display.txt | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/ref/class-based-views/base.txt b/docs/ref/class-based-views/base.txt index b1260093c1..46a029c3bf 100644 --- a/docs/ref/class-based-views/base.txt +++ b/docs/ref/class-based-views/base.txt @@ -87,6 +87,12 @@ MRO is an acronym for Method Resolution Order. 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()``. .. method:: dispatch(request, *args, **kwargs) diff --git a/docs/topics/class-based-views/generic-display.txt b/docs/topics/class-based-views/generic-display.txt index 4a3994f2a1..fd3f3c78c9 100644 --- a/docs/topics/class-based-views/generic-display.txt +++ b/docs/topics/class-based-views/generic-display.txt @@ -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.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:: # urls.py