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/tutorial07.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'docs/intro/tutorial07.txt') diff --git a/docs/intro/tutorial07.txt b/docs/intro/tutorial07.txt index 9f6c775267..1ee4b977ff 100644 --- a/docs/intro/tutorial07.txt +++ b/docs/intro/tutorial07.txt @@ -24,7 +24,7 @@ Let's see how this works by reordering the fields on the edit form. Replace the ``admin.site.register(Question)`` line with: .. code-block:: python - :caption: polls/admin.py + :caption: ``polls/admin.py`` from django.contrib import admin @@ -53,7 +53,7 @@ And speaking of forms with dozens of fields, you might want to split the form up into fieldsets: .. code-block:: python - :caption: polls/admin.py + :caption: ``polls/admin.py`` from django.contrib import admin @@ -87,7 +87,7 @@ There are two ways to solve this problem. The first is to register ``Choice`` with the admin just as we did with ``Question``: .. code-block:: python - :caption: polls/admin.py + :caption: ``polls/admin.py`` from django.contrib import admin @@ -121,7 +121,7 @@ Remove the ``register()`` call for the ``Choice`` model. Then, edit the ``Questi registration code to read: .. code-block:: python - :caption: polls/admin.py + :caption: ``polls/admin.py`` from django.contrib import admin @@ -168,7 +168,7 @@ tabular way of displaying inline related objects. To use it, change the ``ChoiceInline`` declaration to read: .. code-block:: python - :caption: polls/admin.py + :caption: ``polls/admin.py`` class ChoiceInline(admin.TabularInline): #... @@ -200,7 +200,7 @@ tuple of field names to display, as columns, on the change list page for the object: .. code-block:: python - :caption: polls/admin.py + :caption: ``polls/admin.py`` class QuestionAdmin(admin.ModelAdmin): # ... @@ -210,7 +210,7 @@ For good measure, let's also include the ``was_published_recently()`` method from :doc:`Tutorial 2 `: .. code-block:: python - :caption: polls/admin.py + :caption: ``polls/admin.py`` class QuestionAdmin(admin.ModelAdmin): # ... @@ -232,7 +232,7 @@ You can improve that by using the :func:`~django.contrib.admin.display` decorator on that method (in :file:`polls/models.py`), as follows: .. code-block:: python - :caption: polls/models.py + :caption: ``polls/models.py`` from django.contrib import admin @@ -310,7 +310,7 @@ Open your settings file (:file:`mysite/settings.py`, remember) and add a :setting:`DIRS ` option in the :setting:`TEMPLATES` setting: .. code-block:: python - :caption: mysite/settings.py + :caption: ``mysite/settings.py`` TEMPLATES = [ { -- cgit v1.3