summaryrefslogtreecommitdiff
path: root/docs/topics/class-based-views
diff options
context:
space:
mode:
authorAdam Johnson <me@adamj.eu>2025-06-27 14:33:40 +0100
committernessita <124304+nessita@users.noreply.github.com>2025-08-28 13:48:32 -0300
commit56955636e66505b7ac0246f97883f979d1b1f6a1 (patch)
tree681db755e1441105e5fd3300526d9d0eb3e4526d /docs/topics/class-based-views
parentae03f81ffa9dd35b97baf917e4fc944cd0de3b5c (diff)
Ensured :doc: role uses absolute targets in docs.
Diffstat (limited to 'docs/topics/class-based-views')
-rw-r--r--docs/topics/class-based-views/mixins.txt24
1 files changed, 12 insertions, 12 deletions
diff --git a/docs/topics/class-based-views/mixins.txt b/docs/topics/class-based-views/mixins.txt
index 6b2c435e1b..619636d8b9 100644
--- a/docs/topics/class-based-views/mixins.txt
+++ b/docs/topics/class-based-views/mixins.txt
@@ -5,8 +5,8 @@ Using mixins with class-based views
.. caution::
This is an advanced topic. A working knowledge of :doc:`Django's
- class-based views<index>` is advised before exploring these
- techniques.
+ class-based views </topics/class-based-views/index>` is advised before
+ exploring these techniques.
Django's built-in class-based views provide a lot of functionality,
but some of it you may want to use separately. For instance, you may
@@ -120,9 +120,9 @@ but the main one that most people are going to use is
``<app_label>/<model_name>_detail.html``. The ``_detail`` part can be changed
by setting
:attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix`
-on a subclass to something else. (For instance, the :doc:`generic edit
-views<generic-editing>` use ``_form`` for create and update views, and
-``_confirm_delete`` for delete views.)
+on a subclass to something else. (For instance, the :doc:`generic edit views
+</topics/class-based-views/generic-editing>` use ``_form`` for create and
+update views, and ``_confirm_delete`` for delete views.)
``ListView``: working with many Django objects
----------------------------------------------
@@ -213,8 +213,8 @@ in the subclass. However if we want our processing to work on a particular
object, identified from the URL, we'll want the functionality provided by
:class:`~django.views.generic.detail.SingleObjectMixin`.
-We'll demonstrate this with the ``Author`` model we used in the
-:doc:`generic class-based views introduction<generic-display>`.
+We'll demonstrate this with the ``Author`` model we used in the :doc:`generic
+class-based views introduction </topics/class-based-views/generic-display>`.
.. code-block:: python
:caption: ``views.py``
@@ -390,11 +390,11 @@ increasingly complex as you try to do so, and a good rule of thumb is:
.. hint::
- Each of your views should use only mixins or views from one of the
- groups of generic class-based views: :doc:`detail,
- list<generic-display>`, :doc:`editing<generic-editing>` and
- date. For example it's fine to combine
- :class:`TemplateView` (built in view) with
+ Each of your views should use only mixins or views from one of the groups
+ of generic class-based views: :doc:`detail, list
+ </topics/class-based-views/generic-display>`, :doc:`editing
+ </topics/class-based-views/generic-editing>` and date. For example it's
+ fine to combine :class:`TemplateView` (built in view) with
:class:`~django.views.generic.list.MultipleObjectMixin` (generic list), but
you're likely to have problems combining ``SingleObjectMixin`` (generic
detail) with ``MultipleObjectMixin`` (generic list).