khufu_siteview

Easy template-to-view support
Download

khufu_siteview Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Publisher Name:
  • Rocky Burt
  • Publisher web site:
  • http://projects.serverzen.com

khufu_siteview Tags


khufu_siteview Description

Easy template-to-view support khufu_siteview is a Pyramid add-on that hows the registration of a view that can be used to serve all .jinja2 files out of a directory as subviews without the need to map them directly.Usage:Standard setup is to Configurator.include the khufu_siteview package and then add new views as necessary.Example:from pyramid.config import Configuratordef app(global_conf, **settings): config = Configurator(settings=settings) config.include('khufu_siteview') config.add_templateview_route('/some/path/to/site', '/') return config.make_wsgi_app()The previous example mounts the view at the root of the new Pyramid application. The following example url's would work:http://127.0.0.1:8080/favicon.ico -> /some/path/to/site/favicon.icohttp://127.0.0.1:8080/somepage.jinja2 -> /some/path/to/site/somepage.jinja2Static assets such as gif's and ico's will be looked up as if the view was static. Requirements: · Python What's New in This Release: · Fixed bug where standard global renderer vars were being removed


khufu_siteview Related Software