Skip to content

Instantly share code, notes, and snippets.

@andresmrm
Created August 16, 2013 18:51
Show Gist options
  • Save andresmrm/6252505 to your computer and use it in GitHub Desktop.
Save andresmrm/6252505 to your computer and use it in GitHub Desktop.
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']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment