Skip to content

Commit 519f2f0

Browse files
committed
Export sqlalchemy event module on the extension
1 parent 1e536d9 commit 519f2f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flask_sqlalchemy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from flask.signals import Namespace
2222
from operator import itemgetter
2323
from threading import Lock
24-
from sqlalchemy import orm
24+
from sqlalchemy import orm, event
2525
from sqlalchemy.orm.exc import UnmappedClassError
2626
from sqlalchemy.orm.session import Session
2727
from sqlalchemy.orm.interfaces import MapperExtension, SessionExtension, \
@@ -95,6 +95,7 @@ def _include_sqlalchemy(obj):
9595
obj.relationship = _wrap_with_default_query_class(obj.relationship)
9696
obj.relation = _wrap_with_default_query_class(obj.relation)
9797
obj.dynamic_loader = _wrap_with_default_query_class(obj.dynamic_loader)
98+
obj.event = event
9899

99100

100101
class _DebugQueryTuple(tuple):

0 commit comments

Comments
 (0)