summaryrefslogtreecommitdiff
path: root/docs/intro/tutorial03.txt
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-05-31 07:40:54 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-05-31 11:17:01 +0200
commitac90529cc58507d9a07610809a795ec5fc3cbf8c (patch)
tree6c38f93d38cd8e6f59177fe2e5536d951a602af8 /docs/intro/tutorial03.txt
parent1058fc7023d04d07c22a5e667b6a446705119b14 (diff)
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.
Diffstat (limited to 'docs/intro/tutorial03.txt')
-rw-r--r--docs/intro/tutorial03.txt26
1 files changed, 13 insertions, 13 deletions
diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
index 82d0d85cec..b9c9d2b54e 100644
--- a/docs/intro/tutorial03.txt
+++ b/docs/intro/tutorial03.txt
@@ -70,7 +70,7 @@ Now let's add a few more views to ``polls/views.py``. These views are
slightly different, because they take an argument:
.. code-block:: python
- :caption: polls/views.py
+ :caption: ``polls/views.py``
def detail(request, question_id):
return HttpResponse("You're looking at question %s." % question_id)
@@ -86,7 +86,7 @@ Wire these new views into the ``polls.urls`` module by adding the following
:func:`~django.urls.path` calls:
.. code-block:: python
- :caption: polls/urls.py
+ :caption: ``polls/urls.py``
from django.urls import path
@@ -147,7 +147,7 @@ view, which displays the latest 5 poll questions in the system, separated by
commas, according to publication date:
.. code-block:: python
- :caption: polls/views.py
+ :caption: ``polls/views.py``
from django.http import HttpResponse
@@ -196,7 +196,7 @@ Django as ``polls/index.html``.
Put the following code in that template:
.. code-block:: html+django
- :caption: polls/templates/polls/index.html
+ :caption: ``polls/templates/polls/index.html``
{% if latest_question_list %}
<ul>
@@ -218,7 +218,7 @@ __ https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Gett
Now let's update our ``index`` view in ``polls/views.py`` to use the template:
.. code-block:: python
- :caption: polls/views.py
+ :caption: ``polls/views.py``
from django.http import HttpResponse
from django.template import loader
@@ -251,7 +251,7 @@ template. Django provides a shortcut. Here's the full ``index()`` view,
rewritten:
.. code-block:: python
- :caption: polls/views.py
+ :caption: ``polls/views.py``
from django.shortcuts import render
@@ -280,7 +280,7 @@ Now, let's tackle the question detail view -- the page that displays the questio
for a given poll. Here's the view:
.. code-block:: python
- :caption: polls/views.py
+ :caption: ``polls/views.py``
from django.http import Http404
from django.shortcuts import render
@@ -302,7 +302,7 @@ later, but if you'd like to quickly get the above example working, a file
containing just:
.. code-block:: html+django
- :caption: polls/templates/polls/detail.html
+ :caption: ``polls/templates/polls/detail.html``
{{ question }}
@@ -316,7 +316,7 @@ and raise :exc:`~django.http.Http404` if the object doesn't exist. Django
provides a shortcut. Here's the ``detail()`` view, rewritten:
.. code-block:: python
- :caption: polls/views.py
+ :caption: ``polls/views.py``
from django.shortcuts import get_object_or_404, render
@@ -358,7 +358,7 @@ variable ``question``, here's what the ``polls/detail.html`` template might look
like:
.. code-block:: html+django
- :caption: polls/templates/polls/detail.html
+ :caption: ``polls/templates/polls/detail.html``
<h1>{{ question.question_text }}</h1>
<ul>
@@ -432,7 +432,7 @@ The answer is to add namespaces to your URLconf. In the ``polls/urls.py``
file, go ahead and add an ``app_name`` to set the application namespace:
.. code-block:: python
- :caption: polls/urls.py
+ :caption: ``polls/urls.py``
from django.urls import path
@@ -449,14 +449,14 @@ file, go ahead and add an ``app_name`` to set the application namespace:
Now change your ``polls/index.html`` template from:
.. code-block:: html+django
- :caption: polls/templates/polls/index.html
+ :caption: ``polls/templates/polls/index.html``
<li><a href="{% url 'detail' question.id %}">{{ question.question_text }}</a></li>
to point at the namespaced detail view:
.. code-block:: html+django
- :caption: polls/templates/polls/index.html
+ :caption: ``polls/templates/polls/index.html``
<li><a href="{% url 'polls:detail' question.id %}">{{ question.question_text }}</a></li>