Created
October 1, 2013 03:20
-
-
Save ianjosephwilson/6773461 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyramid.config import Configurator | |
def main(global_config, **settings): | |
""" This function returns a Pyramid WSGI application. | |
""" | |
config = Configurator(settings=settings) | |
config.add_static_view('static', 'static', cache_max_age=3600) | |
config.add_route('home', '{url:.*}') | |
config.scan() | |
return config.make_wsgi_app() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyramid.view import view_config | |
@view_config(route_name='home', renderer='string') | |
def my_view(request): | |
return request.matchdict['url'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment