Refs #30083 -- Clarified database state of instances in signals.pre_init docs.

This commit is contained in:
Mariusz Felisiak 2019-07-19 13:02:57 +02:00
parent 1fc2c70f76
commit a2e1c17f19
1 changed files with 7 additions and 0 deletions

View File

@ -99,6 +99,13 @@ Arguments sent with this signal:
``instance``
The actual instance of the model that's just been created.
.. note::
``instance._state`` isn't set before sending the ``post_init`` signal,
so ``_state`` attributes always have their default values. For example,
``_state.db`` is ``None`` and cannot be used to check an ``instance``
database.
``pre_save``
------------