[Grok-dev] setting up local utilities from outside grok
j at jasper.es
Thu Jul 9 05:55:13 EDT 2009
I've got a small issue with setting up local utilities on a
grok.Application; I have something like the following:
This works fine if I instantiate my application through the webinterface.
However, I'd like to be able to instantiate my application using some code
(which doesn't know a lot about grok), where I do something like:
root = get_apps_root() # this sets up the ZODB connection and returns the
# root object
if 'test' not in root:
root['test'] = app = MyWonderfulApp(...)
The application is available, I can access views, but no sitemanager or
localutil is registered, and my authentication thing is not set up.
Is there an easy way to get this to work?
Fox-IT Experts in IT Security!
More information about the Grok-dev