Corrected multiply defined labels in docs.

This commit is contained in:
Mariusz Felisiak 2021-11-04 10:46:01 +01:00 committed by GitHub
parent 95a4db3fbd
commit 60503cc747
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 24 deletions

View file

@ -87,15 +87,13 @@ function or method::
Notice that the function takes a ``sender`` argument, along with wildcard
keyword arguments (``**kwargs``); all signal handlers must take these arguments.
We'll look at senders `a bit later`_, but right now look at the ``**kwargs``
argument. All signals send keyword arguments, and may change those keyword
arguments at any time. In the case of
We'll look at senders :ref:`a bit later <connecting-to-specific-signals>`, but
right now look at the ``**kwargs`` argument. All signals send keyword
arguments, and may change those keyword arguments at any time. In the case of
:data:`~django.core.signals.request_finished`, it's documented as sending no
arguments, which means we might be tempted to write our signal handling as
``my_callback(sender)``.
.. _a bit later: `connecting to signals sent by specific senders`_
This would be wrong -- in fact, Django will throw an error if you do so. That's
because at any point arguments could get added to the signal and your receiver
must be able to handle those new arguments.

View file

@ -261,11 +261,11 @@ backend with different options. In that case you should define a unique
:setting:`OPTIONS <TEMPLATES-OPTIONS>` contains backend-specific settings.
.. _template-loading:
Usage
-----
.. _template-loading:
.. module:: django.template.loader
The ``django.template.loader`` module defines two functions to load templates.