equal
deleted
inserted
replaced
|
1 # |
|
2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net> |
|
3 # All Rights Reserved. |
|
4 # |
|
5 # This software is subject to the provisions of the Zope Public License, |
|
6 # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. |
|
7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
|
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
|
10 # FOR A PARTICULAR PURPOSE. |
|
11 # |
|
12 |
|
13 # import standard packages |
|
14 |
|
15 # import interfaces |
|
16 |
|
17 # import packages |
|
18 from pyramid.config import Configurator |
|
19 from zope.component import getGlobalSiteManager |
|
20 |
|
21 from pyams_utils.registry import set_local_registry |
|
22 |
|
23 |
|
24 def main(global_config, **settings): |
|
25 """ This function returns a Pyramid WSGI application. |
|
26 """ |
|
27 registry = getGlobalSiteManager() |
|
28 set_local_registry(registry) |
|
29 |
|
30 config = Configurator(registry=registry) |
|
31 config.setup_registry(settings=settings) |
|
32 |
|
33 config.scan() |
|
34 return config.make_wsgi_app() |