Skip to content

Commit fea753b

Browse files
committed
Updated documentation
1 parent 7c632e9 commit fea753b

File tree

3 files changed

+64
-17
lines changed

3 files changed

+64
-17
lines changed

CHANGES

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Changelog
2+
---------
3+
4+
Here you can see the full list of changes between each Flask-SQLAlchemy
5+
release.
6+
7+
Version 0.10
8+
````````````
9+
10+
- Added support for signals.
11+
- Table names are now automatically set from the class name unless
12+
overriden.
13+
14+
Version 0.9
15+
```````````
16+
17+
- applied changes to pass the Flask extension approval process.
18+
19+
Version 0.8
20+
```````````
21+
22+
- added a few configuration keys for creating connections.
23+
- automatically activate connection recycling for MySQL connections.
24+
- added support for the Flask testing mode.
25+
26+
Version 0.7
27+
```````````
28+
29+
- Initial public release

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include LICENSE *.py
1+
include LICENSE CHANGES *.py
22
recursive-include docs *
33
recursive-exclude docs *.pyc
44
recursive-exclude docs *.pyo

docs/index.rst

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ And how do you get the data back? Easy as pie:
8787
>>> admin = User.query.filter_by(username='admin').first()
8888
<User u'admin'>
8989

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+
9095
Road to Enlightenment
9196
---------------------
9297

@@ -157,6 +162,34 @@ The following configuration values exist for Flask-SQLAlchemy:
157162
``SQLALCHEMY_POOL_TIMEOUT`` and ``SQLALCHEMY_POOL_RECYCLE``
158163
configuration keys were added.
159164

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+
160193
API
161194
---
162195

@@ -211,19 +244,4 @@ Utilities
211244

212245
.. autofunction:: get_debug_queries
213246

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

Comments
 (0)