pyramid-breve 0.6.2

Breve template engine renderer add-on for Pyramid

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
MIT/X Consortium License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Alexander Kulakov
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
pyramid-breve is an extension for the pyramid framework that allowes users to use the Breve templates as view renderers.

Usage

Call config.include('pyramid_breve') in your WSGI applicatication factory function as following:

def main(global_config, **settings):
 """ This is just an example of how to register renderer for Breve templates.
 """
 config = Configurator(settings=settings)

 config.include('pyramid_breve')

 config.add_static_view('static', 'static', cache_max_age=3600)
 config.scan()

 return config.make_wsgi_app()


Another way is to add it to pyramid.includes in your INI-file:

[app:main]
use = egg:hello_world

pyramid.includes =
 pyramid_breve


Please note that unlike breve.Template which searches for template files under root pyramid_breve renderer uses assets to locate and load templates.

@view_config(route_name='home', renderer='templates/index.b')
def hove_vew(request):
 return {}


@view_config(route_name='login', renderer='my.lovely.package:templates/login.b')
def login_view(request):
 return {}

Last updated on September 21st, 2012

requirements

#template engine #template renderer #pyramid plugin #pyramid #template #engine #renderer

Add your review!

SUBMIT