commit | author | age | ||
e61f33 | 1 | from persistent.mapping import PersistentMapping |
TS | 2 | |
877eeb | 3 | |
c84d93 | 4 | class MyModel(PersistentMapping): |
e61f33 | 5 | __parent__ = __name__ = None |
TS | 6 | |
877eeb | 7 | |
c84d93 | 8 | def appmaker(zodb_root): |
25c64c | 9 | if 'app_root' not in zodb_root: |
c84d93 | 10 | app_root = MyModel() |
CM | 11 | zodb_root['app_root'] = app_root |
e61f33 | 12 | import transaction |
TS | 13 | transaction.commit() |
c84d93 | 14 | return zodb_root['app_root'] |