diff options
| author | Simon Charette <charette.s@gmail.com> | 2013-11-04 23:11:51 -0500 |
|---|---|---|
| committer | Simon Charette <charette.s@gmail.com> | 2013-11-24 17:51:22 -0500 |
| commit | eb38257e5199ca06b8b32f82dd50f64fd6b0d98d (patch) | |
| tree | 218b5face70be2baaffaabd3e5dac009a227727e /docs/ref | |
| parent | 03bc0a8ac5b465a9a1ec88dedb0a2f4bd91dd547 (diff) | |
Fixed #21391 -- Allow model signals to lazily reference their senders.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/signals.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt index 051f1fa915..1abfed8806 100644 --- a/docs/ref/signals.txt +++ b/docs/ref/signals.txt @@ -22,7 +22,7 @@ Model signals :synopsis: Signals sent by the model system. The :mod:`django.db.models.signals` module defines a set of signals sent by the -module system. +model system. .. warning:: @@ -37,6 +37,14 @@ module system. so if your handler is a local function, it may be garbage collected. To prevent this, pass ``weak=False`` when you call the signal's :meth:`~django.dispatch.Signal.connect`. +.. versionadded:: 1.7 + + Model signals ``sender`` model can be lazily referenced when connecting a + receiver by specifying its full application label. For example, an + ``Answer`` model defined in the ``polls`` application could be referenced + as ``'polls.Answer'``. This sort of reference can be quite handy when + dealing with circular import dependencies and swappable models. + pre_init -------- |
