diff options
| -rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
| -rw-r--r-- | docs/quick_tutorial/databases/tutorial/models.py | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index f41e5fdb5..65be5e259 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -348,3 +348,5 @@ Contributors - Jonathan Vanasco, 2019/11/05 - Jan Likar, 2019/11/07 + +- Andrea Borghi, 2019/11/11 diff --git a/docs/quick_tutorial/databases/tutorial/models.py b/docs/quick_tutorial/databases/tutorial/models.py index b27c38417..8e6649d49 100644 --- a/docs/quick_tutorial/databases/tutorial/models.py +++ b/docs/quick_tutorial/databases/tutorial/models.py @@ -13,10 +13,10 @@ from sqlalchemy.orm import ( sessionmaker, ) -from zope.sqlalchemy import ZopeTransactionExtension +from zope.sqlalchemy import register -DBSession = scoped_session( - sessionmaker(extension=ZopeTransactionExtension())) +DBSession = scoped_session(sessionmaker()) +register(DBSession) Base = declarative_base() @@ -32,4 +32,4 @@ class Root(object): (Allow, 'group:editors', 'edit')] def __init__(self, request): - pass
\ No newline at end of file + pass |
