mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[4.1.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 ac90529cc5 from main
			
			
This commit is contained in:
		| @@ -2993,7 +2993,7 @@ it instead of with the default site. Finally, update :file:`myproject/urls.py` | ||||
| to reference your :class:`AdminSite` subclass. | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: myapp/admin.py | ||||
|     :caption: ``myapp/admin.py`` | ||||
|  | ||||
|     from django.contrib import admin | ||||
|  | ||||
| @@ -3007,7 +3007,7 @@ to reference your :class:`AdminSite` subclass. | ||||
|  | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: myproject/urls.py | ||||
|     :caption: ``myproject/urls.py`` | ||||
|  | ||||
|     from django.urls import path | ||||
|  | ||||
| @@ -3034,7 +3034,7 @@ to the dotted import path of either a ``AdminSite`` subclass or a callable that | ||||
| returns a site instance. | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: myproject/admin.py | ||||
|     :caption: ``myproject/admin.py`` | ||||
|  | ||||
|     from django.contrib import admin | ||||
|  | ||||
| @@ -3042,7 +3042,7 @@ returns a site instance. | ||||
|         ... | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: myproject/apps.py | ||||
|     :caption: ``myproject/apps.py`` | ||||
|  | ||||
|     from django.contrib.admin.apps import AdminConfig | ||||
|  | ||||
| @@ -3050,7 +3050,7 @@ returns a site instance. | ||||
|         default_site = 'myproject.admin.MyAdminSite' | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: myproject/settings.py | ||||
|     :caption: ``myproject/settings.py`` | ||||
|  | ||||
|     INSTALLED_APPS = [ | ||||
|         ... | ||||
|   | ||||
| @@ -32,7 +32,7 @@ In your custom ``change_form.html`` template, extend the | ||||
|     {% endblock %} | ||||
|  | ||||
| .. code-block:: javascript | ||||
|     :caption: app/static/app/formset_handlers.js | ||||
|     :caption: ``app/static/app/formset_handlers.js`` | ||||
|  | ||||
|     document.addEventListener('formset:added', (event) => { | ||||
|         if (event.detail.formsetName == 'author_set') { | ||||
|   | ||||
| @@ -131,7 +131,7 @@ password from the `password file`_, you must specify them in the | ||||
| :setting:`OPTIONS` part of your database configuration in :setting:`DATABASES`: | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: settings.py | ||||
|     :caption: ``settings.py`` | ||||
|  | ||||
|     DATABASES = { | ||||
|         'default': { | ||||
| @@ -144,7 +144,7 @@ password from the `password file`_, you must specify them in the | ||||
|     } | ||||
|  | ||||
| .. code-block:: text | ||||
|     :caption: .pg_service.conf | ||||
|     :caption: ``.pg_service.conf`` | ||||
|  | ||||
|     [my_service] | ||||
|     host=localhost | ||||
| @@ -153,7 +153,7 @@ password from the `password file`_, you must specify them in the | ||||
|     port=5432 | ||||
|  | ||||
| .. code-block:: text | ||||
|     :caption: .my_pgpass | ||||
|     :caption: ``.my_pgpass`` | ||||
|  | ||||
|     localhost:5432:NAME:USER:PASSWORD | ||||
|  | ||||
| @@ -1086,7 +1086,7 @@ example of subclassing the PostgreSQL engine to change a feature class | ||||
| ``allows_group_by_selected_pks_on_model``: | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: mysite/mydbengine/base.py | ||||
|     :caption: ``mysite/mydbengine/base.py`` | ||||
|  | ||||
|     from django.db.backends.postgresql import base, features | ||||
|  | ||||
|   | ||||
| @@ -331,7 +331,7 @@ The ``Func`` API is as follows: | ||||
|         customize the SQL as needed. For example: | ||||
|  | ||||
|         .. code-block:: python | ||||
|             :caption: django/db/models/functions.py | ||||
|             :caption: ``django/db/models/functions.py`` | ||||
|  | ||||
|             class ConcatPair(Func): | ||||
|                 ... | ||||
|   | ||||
| @@ -1458,7 +1458,7 @@ Relationships defined this way on :ref:`abstract models | ||||
| concrete model and are not relative to the abstract model's ``app_label``: | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: products/models.py | ||||
|     :caption: ``products/models.py`` | ||||
|  | ||||
|     from django.db import models | ||||
|  | ||||
| @@ -1469,7 +1469,7 @@ concrete model and are not relative to the abstract model's ``app_label``: | ||||
|             abstract = True | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: production/models.py | ||||
|     :caption: ``production/models.py`` | ||||
|  | ||||
|     from django.db import models | ||||
|     from products.models import AbstractCar | ||||
|   | ||||
| @@ -564,7 +564,7 @@ current one as well as templates included via the :ttag:`include` tag, | ||||
| just like all block tags. For example: | ||||
|  | ||||
| .. code-block:: html+django | ||||
|     :caption: base.html | ||||
|     :caption: ``base.html`` | ||||
|  | ||||
|     {% autoescape off %} | ||||
|     <h1>{% block title %}{% endblock %}</h1> | ||||
| @@ -573,7 +573,7 @@ just like all block tags. For example: | ||||
|     {% endautoescape %} | ||||
|  | ||||
| .. code-block:: html+django | ||||
|     :caption: child.html | ||||
|     :caption: ``child.html`` | ||||
|  | ||||
|     {% extends "base.html" %} | ||||
|     {% block title %}This & that{% endblock %} | ||||
| @@ -653,14 +653,14 @@ of all comments related to the current task with:: | ||||
| You can also access methods you've explicitly defined on your own models: | ||||
|  | ||||
| .. code-block:: python | ||||
|     :caption: models.py | ||||
|     :caption: ``models.py`` | ||||
|  | ||||
|     class Task(models.Model): | ||||
|         def foo(self): | ||||
|             return "bar" | ||||
|  | ||||
| .. code-block:: html+django | ||||
|     :caption: template.html | ||||
|     :caption: ``template.html`` | ||||
|  | ||||
|     {{ task.foo }} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user