@@ -87,6 +87,11 @@ And how do you get the data back? Easy as pie:
87
87
>>> admin = User.query.filter_by(username = ' admin' ).first()
88
88
<User u'admin'>
89
89
90
+ .. versionchanged :: 0.10
91
+ The `__tablename__ ` attribute is now optional. If not defined, the
92
+ class name (converted to lowercases and camel cased words separated
93
+ by underscores) is used.
94
+
90
95
Road to Enlightenment
91
96
---------------------
92
97
@@ -157,6 +162,34 @@ The following configuration values exist for Flask-SQLAlchemy:
157
162
``SQLALCHEMY_POOL_TIMEOUT `` and ``SQLALCHEMY_POOL_RECYCLE ``
158
163
configuration keys were added.
159
164
165
+ Signalling Support
166
+ ------------------
167
+
168
+ .. versionadded :: 0.10
169
+
170
+ Starting with Flask-SQLAlchemy 0.10 you can now connect to signals to be
171
+ notified when certain things happen.
172
+
173
+ The following two signals exist:
174
+
175
+ .. data :: models_committed
176
+
177
+ This signal is sent when changed models where committed to the
178
+ database. The sender is the application that emitted the changes
179
+ and the models and an operation identifier are passed as list of tuples
180
+ in the form ``(model, operation) `` to the receiver in the `changes `
181
+ parameter.
182
+
183
+ The model is the instance of the model that was sent to the database
184
+ and the operation is ``'insert' `` when a model was inserted,
185
+ ``'delete' `` when the model was deleted and ``'update' `` if any
186
+ of the columns where updated.
187
+
188
+ .. data :: before_models_committed
189
+
190
+ Works exactly the same as :data: `models_committed ` but is emitted
191
+ right before the comitting takes place.
192
+
160
193
API
161
194
---
162
195
@@ -211,19 +244,4 @@ Utilities
211
244
212
245
.. autofunction :: get_debug_queries
213
246
214
- Changelog
215
- ---------
216
-
217
- 0.8
218
- ```
219
-
220
- - added a few configuration keys for creating connections.
221
-
222
- - automatically activate connection recycling for MySQL connections.
223
-
224
- - added support for the Flask testing mode.
225
-
226
- 0.7
227
- ```
228
-
229
- - Initial public release
247
+ .. include :: ../CHANGES
0 commit comments