blob: ce1c7a81e246eadb6b7655f922766c69a11d421a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
from repoze.bfg.configuration import Configurator
from myproject.models import get_root
def app(global_config, **settings):
""" This function returns a WSGI application.
It is usually called by the PasteDeploy framework during
``paster serve``.
"""
config = Configurator(root_factory=get_root, settings=settings)
config.begin()
zcml_file = settings.get('configure_zcml', 'configure.zcml')
config.load_zcml(zcml_file)
config.end()
return config.make_wsgi_app()
|