mako

Enabled Mako in pyramid

@view_config(route_name='home', renderer='templates/mytemplate.pt')
#to
@view_config(route_name='home', renderer='myapp:templates/mytemplate.mak')

Where myapp is the package name you have created.

Edit development.ini and add this line

mako.directories = myapp:templates

Now inside the view.py you can use:

@view_config(route_name='home', renderer='templates/mytemplate.pt')
#to
@view_config(route_name='home', renderer='mytemplate.mak')

MyWiki: Pyramid/advanced (last edited 2012-07-15 06:11:08 by LukaszSzybalski)