~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/__init__.py

  • Committer: kapil.foss at gmail
  • Date: 2011-10-08 17:22:53 UTC
  • Revision ID: kapil.foss@gmail.com-20111008172253-utsq8socdsx047mw
charmworld pyramid starter

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from pyramid.config import Configurator
 
2
from charmworld.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('charmworld.views.my_view',
 
9
                    context='charmworld:resources.Root',
 
10
                    renderer='charmworld:templates/mytemplate.pt')
 
11
    config.add_static_view('static', 'charmworld:static', cache_max_age=3600)
 
12
    return config.make_wsgi_app()