From 4d20d2f7c2b8e74c3e85bd0716ebdcb3b35a70e6 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 31 May 2022 07:40:54 +0200 Subject: [4.0.x] Fixed docs build with sphinxcontrib-spelling 7.5.0+. sphinxcontrib-spelling 7.5.0+ includes captions of figures in the set of nodes for which the text is checked. Backport of ac90529cc58507d9a07610809a795ec5fc3cbf8c from main. --- docs/intro/tutorial04.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/intro/tutorial04.txt') diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt index f388166c44..5deb80047d 100644 --- a/docs/intro/tutorial04.txt +++ b/docs/intro/tutorial04.txt @@ -18,7 +18,7 @@ Let's update our poll detail template ("polls/detail.html") from the last tutorial, so that the template contains an HTML ``
`` element: .. code-block:: html+django - :caption: polls/templates/polls/detail.html + :caption: ``polls/templates/polls/detail.html`` {% csrf_token %} @@ -64,7 +64,7 @@ something with it. Remember, in :doc:`Tutorial 3 `, we created a URLconf for the polls application that includes this line: .. code-block:: python - :caption: polls/urls.py + :caption: ``polls/urls.py`` path('/vote/', views.vote, name='vote'), @@ -72,7 +72,7 @@ We also created a dummy implementation of the ``vote()`` function. Let's create a real version. Add the following to ``polls/views.py``: .. code-block:: python - :caption: polls/views.py + :caption: ``polls/views.py`` from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render @@ -152,7 +152,7 @@ After somebody votes in a question, the ``vote()`` view redirects to the results page for the question. Let's write that view: .. code-block:: python - :caption: polls/views.py + :caption: ``polls/views.py`` from django.shortcuts import get_object_or_404, render @@ -168,7 +168,7 @@ redundancy later. Now, create a ``polls/results.html`` template: .. code-block:: html+django - :caption: polls/templates/polls/results.html + :caption: ``polls/templates/polls/results.html``

{{ question.question_text }}

@@ -240,7 +240,7 @@ Amend URLconf First, open the ``polls/urls.py`` URLconf and change it like so: .. code-block:: python - :caption: polls/urls.py + :caption: ``polls/urls.py`` from django.urls import path @@ -265,7 +265,7 @@ views and use Django's generic views instead. To do so, open the ``polls/views.py`` file and change it like so: .. code-block:: python - :caption: polls/views.py + :caption: ``polls/views.py`` from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404, render -- cgit v1.3