diff options
| author | SaJH <wogur981208@gmail.com> | 2025-08-26 00:50:53 +0900 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-08-28 08:52:43 +0200 |
| commit | 3c0c54351b58e9386375d2bd7a8c60dadc4bb6e8 (patch) | |
| tree | 38a78ca516fc998ae29818fa7950af5278bc7c9b /docs/howto | |
| parent | 1285de557b0b8b9c5ebe5de0114b2da5abe60f80 (diff) | |
Fixed #36570 -- Removed unnecessary :py domain from documentation roles.
Signed-off-by: SaJH <wogur981208@gmail.com>
Diffstat (limited to 'docs/howto')
| -rw-r--r-- | docs/howto/custom-management-commands.txt | 4 | ||||
| -rw-r--r-- | docs/howto/logging.txt | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt index 5ee82b3774..71c5fdac0c 100644 --- a/docs/howto/custom-management-commands.txt +++ b/docs/howto/custom-management-commands.txt @@ -120,7 +120,7 @@ this:: # ... The option (``delete`` in our example) is available in the options dict -parameter of the handle method. See the :py:mod:`argparse` Python documentation +parameter of the handle method. See the :mod:`argparse` Python documentation for more about ``add_argument`` usage. In addition to being able to add custom command line options, all @@ -208,7 +208,7 @@ All attributes can be set in your derived class and can be used in If your command defines mandatory positional arguments, you can customize the message error returned in the case of missing arguments. The default is - output by :py:mod:`argparse` ("too few arguments"). + output by :mod:`argparse` ("too few arguments"). .. attribute:: BaseCommand.output_transaction diff --git a/docs/howto/logging.txt b/docs/howto/logging.txt index 149b8bb83b..7826eb38d9 100644 --- a/docs/howto/logging.txt +++ b/docs/howto/logging.txt @@ -25,7 +25,7 @@ To send a log message from within your code, you place a logging call into it. logging, use a view function as suggested in the example below. First, import the Python logging library, and then obtain a logger instance -with :py:func:`logging.getLogger`. Provide the ``getLogger()`` method with a +with :func:`logging.getLogger`. Provide the ``getLogger()`` method with a name to identify it and the records it emits. A good option is to use ``__name__`` (see :ref:`naming-loggers` below for more on this) which will provide the name of the current Python module as a dotted path:: @@ -43,7 +43,7 @@ And then in a function, for example in a view, send a record to the logger:: if some_risky_state: logger.warning("Platform is running at risk") -When this code is executed, a :py:class:`~logging.LogRecord` containing that +When this code is executed, a :class:`~logging.LogRecord` containing that message will be sent to the logger. If you're using Django's default logging configuration, the message will appear in the console. @@ -129,7 +129,7 @@ file ``general.log`` (at the project root): Different handler classes take different configuration options. For more information on available handler classes, see the :class:`~django.utils.log.AdminEmailHandler` provided by Django and the various -:py:mod:`handler classes <logging.handlers>` provided by Python. +:mod:`handler classes <logging.handlers>` provided by Python. Logging levels can also be set on the handlers (by default, they accept log messages of all levels). Using the example above, adding: @@ -238,7 +238,7 @@ application. A named logging configuration will capture logs only from loggers with matching names. The namespace of a logger instance is defined using -:py:func:`~logging.getLogger`. For example in ``views.py`` of ``my_app``:: +:func:`~logging.getLogger`. For example in ``views.py`` of ``my_app``:: logger = logging.getLogger(__name__) |
