Holger Frey
7 years ago
11 changed files with 45 additions and 27 deletions
@ -0,0 +1,18 @@ |
|||||||
|
class Root(object): |
||||||
|
__name__ = None |
||||||
|
__parent__ = None |
||||||
|
|
||||||
|
|
||||||
|
def root_factory(request): |
||||||
|
return Root() |
||||||
|
|
||||||
|
|
||||||
|
def includeme(config): |
||||||
|
''' |
||||||
|
Initialize the resources for traversal in a Pyramid app. |
||||||
|
|
||||||
|
Activate this setup using ``config.include('ordr2.resources')``. |
||||||
|
|
||||||
|
''' |
||||||
|
config.set_root_factory(root_factory) |
||||||
|
config.add_static_view('static', 'ordr2:static', cache_max_age=3600) |
@ -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