commit | author | age
|
360eba
|
1 |
from pyramid.config import Configurator |
CM |
2 |
from {{package}}.resources import Root |
|
3 |
|
|
4 |
def main(global_config, **settings): |
|
5 |
""" This function returns a Pyramid WSGI application. |
|
6 |
""" |
|
7 |
config = Configurator(root_factory=Root, settings=settings) |
|
8 |
config.add_view('{{package}}.views.my_view', |
|
9 |
context='{{package}}:resources.Root', |
|
10 |
renderer='{{package}}:templates/mytemplate.pt') |
|
11 |
config.add_static_view('static', '{{package}}:static', cache_max_age=3600) |
|
12 |
return config.make_wsgi_app() |