Holger Frey
7 years ago
6 changed files with 16 additions and 8 deletions
@ -1,12 +1,18 @@ |
|||||||
from pyramid.config import Configurator |
from pyramid.config import Configurator |
||||||
|
|
||||||
|
|
||||||
|
def root_factory(request): |
||||||
|
''' dummy root factory ''' |
||||||
|
return dict() |
||||||
|
|
||||||
|
|
||||||
def main(global_config, **settings): |
def main(global_config, **settings): |
||||||
""" This function returns a Pyramid WSGI application. |
""" This function returns a Pyramid WSGI application. |
||||||
""" |
""" |
||||||
config = Configurator(settings=settings) |
config = Configurator(settings=settings) |
||||||
config.include('pyramid_jinja2') |
config.include('pyramid_jinja2') |
||||||
config.include('.models') |
config.include('.models') |
||||||
config.include('.routes') |
config.add_static_view('static', 'static', cache_max_age=3600) |
||||||
|
config.set_root_factory(root_factory) |
||||||
config.scan() |
config.scan() |
||||||
return config.make_wsgi_app() |
return config.make_wsgi_app() |
||||||
|
@ -1,3 +0,0 @@ |
|||||||
def includeme(config): |
|
||||||
config.add_static_view('static', 'static', cache_max_age=3600) |
|
||||||
config.add_route('home', '/') |
|
Reference in new issue