Skip to content

Instantly share code, notes, and snippets.

@aodag
Created April 25, 2014 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aodag/11283895 to your computer and use it in GitHub Desktop.
Save aodag/11283895 to your computer and use it in GitHub Desktop.
from pyramid.config import Configurator
from pyramid.view import view_config
import waitress
@view_config(renderer='index.html')
def index(request):
return dict(message='Hello, jinja!')
def main():
config = Configurator()
config.include('pyramid_jinja2')
config.add_jinja2_renderer('.html')
config.add_jinja2_search_path('a.b.c:templates', name='.html')
config.scan(".")
app = config.make_wsgi_app()
waitress.serve(app)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment