Steve Piercy
2017-07-27 c3ca82935c6ecfbd1464e8adbf36554dff1f3b3e
commit | author | age
e53e13 1 from persistent.mapping import PersistentMapping
CM 2
6d1eee 3
e53e13 4 class MyModel(PersistentMapping):
CM 5     __parent__ = __name__ = None
6
6d1eee 7
e53e13 8 def appmaker(zodb_root):
f5a9a5 9     if 'app_root' not in zodb_root:
e53e13 10         app_root = MyModel()
CM 11         zodb_root['app_root'] = app_root
12     return zodb_root['app_root']