From 6fc689a22d2d8bc84b2c407132af5d2cb2cf0673 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 4 Nov 2021 10:46:01 +0100 Subject: [4.0.x] Corrected multiply defined labels in docs. Backport of 60503cc747eeda7c61bab02b71f8f55a733a6eea from main --- docs/topics/signals.txt | 8 +++----- docs/topics/templates.txt | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'docs/topics') diff --git a/docs/topics/signals.txt b/docs/topics/signals.txt index 4c88c6b25f..f4c6290a14 100644 --- a/docs/topics/signals.txt +++ b/docs/topics/signals.txt @@ -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 `, 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. diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt index 4b00028e45..59658c66e9 100644 --- a/docs/topics/templates.txt +++ b/docs/topics/templates.txt @@ -261,11 +261,11 @@ backend with different options. In that case you should define a unique :setting:`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. -- cgit v1.3