khufu_siteview 0.9.1

Easy template-to-view support

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in khufu_siteview 0.9.1:

  • Fixed bug where standard global renderer vars were being removed
Read full changelog
send us
an update
LICENSE TYPE:
BSD License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Rocky Burt
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
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 Configurator

def 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.ico
http://127.0.0.1:8080/somepage.jinja2   ->  /some/path/to/site/somepage.jinja2


Static assets such as gif's and ico's will be looked up as if the view was static.

Last updated on April 29th, 2011

requirements

#template-to-view support #Pyramid add-on #Pyramid #template-to-view #jinja2 #siteview

Add your review!

SUBMIT