Changes between Version 10 and Version 11 of Signals
- Timestamp:
- Oct 4, 2006, 11:11:57 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Signals
v10 v11 101 101 '''pre_init''' 102 102 103 Whenever you create a new instance of a Django model (for example, in [http://www.djangoproject.com/documentation/tutorial1/ the first part of the Django tutorial] when you do `p = Poll(question="What's up?", pub_date=datetime.now())`) , this signal is sent at the beginning of the execution of the model's `__init__` method. 103 Whenever you create a new instance of a Django model (for example, in [http://www.djangoproject.com/documentation/tutorial1/ the first part of the Django tutorial] when you do `p = Poll(question="What's up?", pub_date=datetime.now())`) , this signal is sent at the beginning of the execution of the model's `__init__` method. '''Note:''' if you override `__init__` on your model, you must call the parent class' `__init__` method for this signal to be sent, and it will be sent at the beginning of the parent class' `__init__` method. 104 104 105 105 Arguments sent with this signal: … … 111 111 '''post_init''' 112 112 113 Like `pre_init`, but this one is sent when the model's `__init__` method is done executing. 113 Like `pre_init`, but this one is sent when the model's `__init__` method is done executing. '''Note:''' if you override `__init__` on your model, you must call the parent class' `__init__` method for this signal to be sent, and it will be sent at the end of the parent class' `__init__` method. 114 114 115 115 Arguments sent with this signal: … … 120 120 '''pre_save''' 121 121 122 This is sent at the beginning of a model's `save` method. 122 This is sent at the beginning of a model's `save` method. '''Note:''' if you override `save` on your model, you must call the parent class' `save` method for this signal to be sent, and it will be sent at the beginning of the parent class' `save` method. 123 123 124 124 Arguments sent with this signal: … … 129 129 '''post_save''' 130 130 131 This is sent at the end of a model's `save` method. 131 This is sent at the end of a model's `save` method. '''Note:''' if you override `save` on your model, you must call the parent class' `save` method for this signal to be sent, and it will be sent at the end of the parent class' `save` method. 132 132 133 133 Arguments sent with this signal: