summaryrefslogtreecommitdiff
path: root/docs/narr/MyProject/myproject/__init__.py
blob: 04e219e36746d468983f9da73c3c288fd4e9b298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from pyramid.config import Configurator
from myproject.resources import Root

def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = Configurator(root_factory=Root, settings=settings)
    config.add_view('myproject.views.my_view',
                    context='myproject.resources.Root',
                    renderer='myproject:templates/mytemplate.pt')
    config.add_static_view('static', 'myproject:static')
    return config.make_wsgi_app()