/usr/lib/python2.7/dist-packages/pyramid/scaffolds/zodb/+package+/models.py is in python-pyramid 1.4.5+dfsg-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | from persistent.mapping import PersistentMapping
class MyModel(PersistentMapping):
__parent__ = __name__ = None
def appmaker(zodb_root):
if not 'app_root' in zodb_root:
app_root = MyModel()
zodb_root['app_root'] = app_root
import transaction
transaction.commit()
return zodb_root['app_root']
|