diff options
| author | Donald Stufft <donald@stufft.io> | 2013-05-17 18:18:35 -0400 |
|---|---|---|
| committer | Donald Stufft <donald@stufft.io> | 2013-05-23 01:09:22 -0400 |
| commit | 3de1288042f2dc1cb8a2b36ae0fc4d9e0beb6494 (patch) | |
| tree | 39d6fcbd6f52ab17b9d619bccaa74dd222aca8bd /docs | |
| parent | 11b06532f7633478b341c9d1da6d29e9839a4e9a (diff) | |
Fixed #11398 - Added a pre_syncdb signal
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/signals.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt index ca472bd60e..e7270e1957 100644 --- a/docs/ref/signals.txt +++ b/docs/ref/signals.txt @@ -360,6 +360,53 @@ Management signals Signals sent by :doc:`django-admin </ref/django-admin>`. +pre_syncdb +---------- + +.. data:: django.db.models.signals.pre_syncdb + :module: + +Sent by the :djadmin:`syncdb` command before it starts to install an +application. + +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 +handlers are registered anywhere else they may not be loaded by +:djadmin:`syncdb`. + +Arguments sent with this signal: + +``sender`` + The ``models`` module that was just installed. That is, if + :djadmin:`syncdb` just installed an app called ``"foo.bar.myapp"``, + ``sender`` will be the ``foo.bar.myapp.models`` module. + +``app`` + Same as ``sender``. + +``create_models`` + A list of the model classes from any app which :djadmin:`syncdb` plans to + create. + + +``verbosity`` + Indicates how much information manage.py is printing on screen. See + the :djadminopt:`--verbosity` flag for details. + + Functions which listen for :data:`pre_syncdb` should adjust what they + output to the screen based on the value of this argument. + +``interactive`` + If ``interactive`` is ``True``, it's safe to prompt the user to input + things on the command line. If ``interactive`` is ``False``, functions + which listen for this signal should not try to prompt for anything. + + For example, the :mod:`django.contrib.auth` app only prompts to create a + superuser when ``interactive`` is ``True``. + +``db`` + The alias of database on which a command will operate. + post_syncdb ----------- |
