summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorSaJH <wogur981208@gmail.com>2025-08-26 00:50:53 +0900
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-08-28 08:52:43 +0200
commit3c0c54351b58e9386375d2bd7a8c60dadc4bb6e8 (patch)
tree38a78ca516fc998ae29818fa7950af5278bc7c9b /docs/ref
parent1285de557b0b8b9c5ebe5de0114b2da5abe60f80 (diff)
Fixed #36570 -- Removed unnecessary :py domain from documentation roles.
Signed-off-by: SaJH <wogur981208@gmail.com>
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/staticfiles.txt2
-rw-r--r--docs/ref/databases.txt2
-rw-r--r--docs/ref/django-admin.txt2
-rw-r--r--docs/ref/files/file.txt6
-rw-r--r--docs/ref/forms/fields.txt6
-rw-r--r--docs/ref/logging.txt2
-rw-r--r--docs/ref/models/expressions.txt4
-rw-r--r--docs/ref/models/fields.txt12
-rw-r--r--docs/ref/request-response.txt6
-rw-r--r--docs/ref/templates/builtins.txt8
-rw-r--r--docs/ref/unicode.txt2
-rw-r--r--docs/ref/urls.txt4
-rw-r--r--docs/ref/utils.txt6
13 files changed, 31 insertions, 31 deletions
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt
index 2ca9c9a519..f5f078a239 100644
--- a/docs/ref/contrib/staticfiles.txt
+++ b/docs/ref/contrib/staticfiles.txt
@@ -492,7 +492,7 @@ This view function serves static files in development.
.. note::
To guess the served files' content types, this view relies on the
- :py:mod:`mimetypes` module from the Python standard library, which itself
+ :mod:`mimetypes` module from the Python standard library, which itself
relies on the underlying platform's map files. If you find that this view
doesn't return proper content types for certain files, it is most likely
that the platform's map files are incorrect or need to be updated. This can
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index e54776359e..fad6976b5c 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -951,7 +951,7 @@ Enabling JSON1 extension on SQLite
----------------------------------
To use :class:`~django.db.models.JSONField` on SQLite, you need to enable the
-`JSON1 extension`_ on Python's :py:mod:`sqlite3` library. If the extension is
+`JSON1 extension`_ on Python's :mod:`sqlite3` library. If the extension is
not enabled on your installation, a system error (``fields.E180``) will be
raised.
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index a9d4a1b7b4..245a8f387c 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -1845,7 +1845,7 @@ allows for the following options by default:
.. django-admin-option:: --pythonpath PYTHONPATH
-Adds the given filesystem path to the Python :py:data:`sys.path` module
+Adds the given filesystem path to the Python :data:`sys.path` module
attribute. If this isn't provided, ``django-admin`` will use the
:envvar:`PYTHONPATH` environment variable.
diff --git a/docs/ref/files/file.txt b/docs/ref/files/file.txt
index 6fd56c227b..701b2e5b37 100644
--- a/docs/ref/files/file.txt
+++ b/docs/ref/files/file.txt
@@ -13,7 +13,7 @@ The ``File`` class
.. class:: File(file_object, name=None)
The :class:`File` class is a thin wrapper around a Python
- :py:term:`file object` with some Django-specific additions.
+ :term:`file object` with some Django-specific additions.
Internally, Django uses this class when it needs to represent a file.
:class:`File` objects have the following attributes and methods:
@@ -29,14 +29,14 @@ The ``File`` class
.. attribute:: file
- The underlying :py:term:`file object` that this class wraps.
+ The underlying :term:`file object` that this class wraps.
.. admonition:: Be careful with this attribute in subclasses.
Some subclasses of :class:`File`, including
:class:`~django.core.files.base.ContentFile` and
:class:`~django.db.models.fields.files.FieldFile`, may replace this
- attribute with an object other than a Python :py:term:`file
+ attribute with an object other than a Python :term:`file
object`. In these cases, this attribute may itself be a
:class:`File` subclass (and not necessarily the same subclass).
Whenever possible, use the attributes and methods of the subclass
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index c786239c25..6108932d58 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -919,7 +919,7 @@ For each field, we describe the default widget used if you don't specify
.. attribute:: encoder
- A :py:class:`json.JSONEncoder` subclass to serialize data types not
+ A :class:`json.JSONEncoder` subclass to serialize data types not
supported by the standard JSON serializer (e.g. ``datetime.datetime``
or :class:`~python:uuid.UUID`). For example, you can use the
:class:`~django.core.serializers.json.DjangoJSONEncoder` class.
@@ -928,14 +928,14 @@ For each field, we describe the default widget used if you don't specify
.. attribute:: decoder
- A :py:class:`json.JSONDecoder` subclass to deserialize the input. Your
+ A :class:`json.JSONDecoder` subclass to deserialize the input. Your
deserialization may need to account for the fact that you can't be
certain of the input type. For example, you run the risk of returning a
``datetime`` that was actually a string that just happened to be in the
same format chosen for ``datetime``\s.
The ``decoder`` can be used to validate the input. If
- :py:class:`json.JSONDecodeError` is raised during the deserialization,
+ :class:`json.JSONDecodeError` is raised during the deserialization,
a ``ValidationError`` will be raised.
Defaults to ``json.JSONDecoder``.
diff --git a/docs/ref/logging.txt b/docs/ref/logging.txt
index 756ac6d8f9..686145b673 100644
--- a/docs/ref/logging.txt
+++ b/docs/ref/logging.txt
@@ -164,7 +164,7 @@ Messages to this logger have the following extra context:
* ``status_code``: The HTTP response code associated with the request.
-* ``request``: The request object (a :py:class:`socket.socket`) that generated
+* ``request``: The request object (a :class:`socket.socket`) that generated
the logging message.
.. _django-template-logger:
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt
index d4095a3900..121ed0f30a 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -563,7 +563,7 @@ values into their corresponding database type.
If no :ref:`output_field<output-field>` is specified, it will be inferred from
the type of the provided ``value`` for many common types. For example, passing
-an instance of :py:class:`datetime.datetime` as ``value`` defaults
+an instance of :class:`datetime.datetime` as ``value`` defaults
``output_field`` to :class:`~django.db.models.DateTimeField`.
``ExpressionWrapper()`` expressions
@@ -1094,7 +1094,7 @@ calling the appropriate methods on the wrapped expression.
Tells Django which value should be returned when the expression is used
to apply a function over an empty result set. Defaults to
- :py:data:`NotImplemented` which forces the expression to be computed on
+ :data:`NotImplemented` which forces the expression to be computed on
the database.
.. attribute:: set_returning
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index b08718879b..dd0862926a 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -1434,7 +1434,7 @@ Python native format: dictionaries, lists, strings, numbers, booleans and
.. attribute:: JSONField.encoder
- An optional :py:class:`json.JSONEncoder` subclass to serialize data types
+ An optional :class:`json.JSONEncoder` subclass to serialize data types
not supported by the standard JSON serializer (e.g. ``datetime.datetime``
or :class:`~python:uuid.UUID`). For example, you can use the
:class:`~django.core.serializers.json.DjangoJSONEncoder` class.
@@ -1443,7 +1443,7 @@ Python native format: dictionaries, lists, strings, numbers, booleans and
.. attribute:: JSONField.decoder
- An optional :py:class:`json.JSONDecoder` subclass to deserialize the value
+ An optional :class:`json.JSONDecoder` subclass to deserialize the value
retrieved from the database. The value will be in the format chosen by the
custom encoder (most often a string). Your deserialization may need to
account for the fact that you can't be certain of the input type. For
@@ -1458,7 +1458,7 @@ To query ``JSONField`` in the database, see :ref:`querying-jsonfield`.
.. admonition:: Default value
If you give the field a :attr:`~django.db.models.Field.default`, ensure
- it's a callable such as the :py:class:`dict` class or a function that
+ it's a callable such as the :class:`dict` class or a function that
returns a fresh object each time. Incorrectly using a mutable object like
``default={}`` or ``default=[]`` creates a mutable default that is shared
between all instances.
@@ -1483,8 +1483,8 @@ To query ``JSONField`` in the database, see :ref:`querying-jsonfield`.
.. admonition:: Oracle users
Oracle Database does not support storing JSON scalar values. Only JSON
- objects and arrays (represented in Python using :py:class:`dict` and
- :py:class:`list`) are supported.
+ objects and arrays (represented in Python using :class:`dict` and
+ :class:`list`) are supported.
``PositiveBigIntegerField``
---------------------------
@@ -2440,7 +2440,7 @@ Field API reference
.. attribute:: descriptor_class
- A class implementing the :py:ref:`descriptor protocol <descriptors>`
+ A class implementing the :ref:`descriptor protocol <descriptors>`
that is instantiated and assigned to the model instance attribute. The
constructor must accept a single argument, the ``Field`` instance.
Overriding this class attribute allows for customizing the get and set
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index ab1f3575e8..892dc24008 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -889,7 +889,7 @@ Attributes
.. attribute:: HttpResponse.cookies
- A :py:obj:`http.cookies.SimpleCookie` object holding the cookies included
+ A :obj:`http.cookies.SimpleCookie` object holding the cookies included
in the response.
.. attribute:: HttpResponse.headers
@@ -952,7 +952,7 @@ Methods
``"text/html; charset=utf-8"``.
``status`` is the :rfc:`HTTP status code <9110#section-15>` for the
- response. You can use Python's :py:class:`http.HTTPStatus` for meaningful
+ response. You can use Python's :class:`http.HTTPStatus` for meaningful
aliases, such as ``HTTPStatus.NO_CONTENT``.
``reason`` is the HTTP response phrase. If not provided, a default phrase
@@ -1187,7 +1187,7 @@ Custom response classes
~~~~~~~~~~~~~~~~~~~~~~~
If you find yourself needing a response class that Django doesn't provide, you
-can create it with the help of :py:class:`http.HTTPStatus`. For example::
+can create it with the help of :class:`http.HTTPStatus`. For example::
from http import HTTPStatus
from django.http import HttpResponse
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index 432418b07f..9eee51beba 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -1225,14 +1225,14 @@ attribute and calling the result ``country_list``.
``{% regroup %}`` produces a list (in this case, ``country_list``) of
**group objects**. Group objects are instances of
-:py:func:`~collections.namedtuple` with two fields:
+:func:`~collections.namedtuple` with two fields:
* ``grouper`` -- the item that was grouped by (e.g., the string "India" or
"Japan").
* ``list`` -- a list of all items in this group (e.g., a list of all cities
with country='India').
-Because ``{% regroup %}`` produces :py:func:`~collections.namedtuple` objects,
+Because ``{% regroup %}`` produces :func:`~collections.namedtuple` objects,
you can also write the previous example as:
.. code-block:: html+django
@@ -1839,7 +1839,7 @@ For example:
{{ value|date:"D d M Y" }}
-If ``value`` is a :py:class:`~datetime.datetime` object (e.g., the result of
+If ``value`` is a :class:`~datetime.datetime` object (e.g., the result of
``datetime.datetime.now()``), the output will be the string
``'Wed 09 Jan 2008'``.
@@ -2736,7 +2736,7 @@ specifier for the ``de`` locale as shipped with Django is ``"H:i"``).
The ``time`` filter will only accept parameters in the format string that
relate to the time of day, not the date. If you need to format a ``date``
value, use the :tfilter:`date` filter instead (or along with :tfilter:`time` if
-you need to render a full :py:class:`~datetime.datetime` value).
+you need to render a full :class:`~datetime.datetime` value).
There is one exception the above rule: When passed a ``datetime`` value with
attached timezone information (a :ref:`time-zone-aware
diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt
index f8ac528666..86cc421603 100644
--- a/docs/ref/unicode.txt
+++ b/docs/ref/unicode.txt
@@ -268,7 +268,7 @@ Use strings when creating templates manually::
But the common case is to read templates from the filesystem. If your template
files are not stored with a UTF-8 encoding, adjust the :setting:`TEMPLATES`
-setting. The built-in :py:mod:`~django.template.backends.django` backend
+setting. The built-in :mod:`~django.template.backends.django` backend
provides the ``'file_charset'`` option to change the encoding used to read
files from disk.
diff --git a/docs/ref/urls.txt b/docs/ref/urls.txt
index 094fca992b..3129f6ab3c 100644
--- a/docs/ref/urls.txt
+++ b/docs/ref/urls.txt
@@ -95,7 +95,7 @@ Returns an element for inclusion in ``urlpatterns``. For example::
The ``route`` argument should be a string or
:func:`~django.utils.translation.gettext_lazy` (see
:ref:`translating-urlpatterns`) that contains a regular expression compatible
-with Python's :py:mod:`re` module. Strings typically use raw string syntax
+with Python's :mod:`re` module. Strings typically use raw string syntax
(``r''``) so that they can contain sequences like ``\d`` without the need to
escape the backslash with another backslash. When a match is made, captured
groups from the regular expression are passed to the view -- as named arguments
@@ -104,7 +104,7 @@ passed as strings, without any type conversion.
When a ``route`` ends with ``$`` the whole requested URL, matching against
:attr:`~django.http.HttpRequest.path_info`, must match the regular expression
-pattern (:py:func:`re.fullmatch` is used).
+pattern (:func:`re.fullmatch` is used).
The ``view``, ``kwargs`` and ``name`` arguments are the same as for
:func:`~django.urls.path`.
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index fb053f6895..f8a58fcda1 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -352,7 +352,7 @@ compatibility
An optional string containing the MIME type of the stylesheet. If not
specified, Django will attempt to guess it by using Python's
- :py:func:`mimetypes.guess_type`. Use ``mimetype=None`` if you don't
+ :func:`mimetypes.guess_type`. Use ``mimetype=None`` if you don't
want your stylesheet to have a MIME type specified.
.. attribute:: media
@@ -532,7 +532,7 @@ compatibility
# set a value manually, that will persist on the instance until cleared
person.friends = ["Huckleberry Finn", "Tom Sawyer"]
- Because of the way the :py:ref:`descriptor protocol
+ Because of the way the :ref:`descriptor protocol
<descriptor-invocation>` works, using ``del`` (or ``delattr``) on a
``cached_property`` that hasn't been accessed raises ``AttributeError``.
@@ -560,7 +560,7 @@ compatibility
.. class:: classproperty(method=None)
- Similar to :py:func:`@classmethod <classmethod>`, the ``@classproperty``
+ Similar to :func:`@classmethod <classmethod>`, the ``@classproperty``
decorator converts the result of a method with a single ``cls`` argument
into a property that can be accessed directly from the class.