You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
577 B
27 lines
577 B
from pyramid.security import Allow, Everyone |
|
|
|
class Root(object): |
|
''' Root resource ''' |
|
|
|
__name__ = None |
|
__parent__ = None |
|
|
|
nav_highlight = None |
|
|
|
def __init__(self, request): |
|
self._request = request |
|
|
|
def __acl__(self): |
|
return [ (Allow, Everyone, 'view') ] |
|
|
|
|
|
|
|
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) |
|
config.add_static_view('static', 'ordr2:static', cache_max_age=3600)
|
|
|