Hi All,

What's the "correct" way to provide utilities in BFG imperatively?

My guess would be:

from repoze.bfg.configuration import Configurator
from somewhere import ISomething
from zope.component import provideUtility

def factory():
     return ...yada...

def app(global_config, **settings):
     config = Configurator(settings=settings)
     config.begin()
     ...yada...
     provideUtility(factory(),ISomething)
     config.scan()
     config.end()
     return config.make_wsgi_app()

...or do I have to do something to make sure I register in the right 
registry?

cheers,

Chris

_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to