Skip to content

Commit

Permalink
Fixed #22028 -- Documented that database signals aren't emitted for a…
Browse files Browse the repository at this point in the history
…pps that laack a models module.

Thanks un33k for the suggestion and donjpacheco for the draft patch.
  • Loading branch information
timgraham committed Feb 28, 2014
1 parent 2f25cdc commit 55fb162
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/ref/applications.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ Read-only attributes
from 'django/contrib/admin/models.pyc'>``. from 'django/contrib/admin/models.pyc'>``.


It may be ``None`` if the application doesn't contain a ``models`` module. It may be ``None`` if the application doesn't contain a ``models`` module.
Note that the database related signals such as
:data:`~django.db.models.signals.pre_migrate` and
:data:`~django.db.models.signals.post_migrate`
are only emitted for applications that have a ``models`` module.


Methods Methods
------- -------
Expand Down
5 changes: 3 additions & 2 deletions docs/ref/signals.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ pre_migrate
:module: :module:


Sent by the :djadmin:`migrate` command before it starts to install an Sent by the :djadmin:`migrate` command before it starts to install an
application. application. It's not emitted for applications that lack a ``models`` module.


Any handlers that listen to this signal need to be written in a particular Any handlers that listen to this signal need to be written in a particular
place: a ``management`` module in one of your :setting:`INSTALLED_APPS`. If place: a ``management`` module in one of your :setting:`INSTALLED_APPS`. If
Expand Down Expand Up @@ -469,7 +469,8 @@ post_migrate
:module: :module:


Sent by the :djadmin:`migrate` command after it installs an application, and the Sent by the :djadmin:`migrate` command after it installs an application, and the
:djadmin:`flush` command. :djadmin:`flush` command. It's not emitted for applications that lack a
``models`` module.


Any handlers that listen to this signal need to be written in a particular Any handlers that listen to this signal need to be written in a particular
place: a ``management`` module in one of your :setting:`INSTALLED_APPS`. If place: a ``management`` module in one of your :setting:`INSTALLED_APPS`. If
Expand Down

0 comments on commit 55fb162

Please sign in to comment.