pyramid_haml configures your pyramid project to allow the use of HAML as template markup language.
It uses PyHAML as preprocessor for the Mako template renderer.
-
Simply use pip to get the latest package:
pip install pyramid_haml
-
Adjust your "your_project/__init__.py" and add the following line somewhere to in the
main()
function:config.include("pyramid_haml")
-
Whenever you use a template file with '.haml' as suffix it will be rendered via PyHAML.
-
Because PyHAML uses the Mako rendering engine, you can configure
pyramid_haml
with the same options as pyramid_mako, prefixing each option withhaml.
instead ofmako.
.
You can find documentation on the PyHAML project page on github or at the HAML project website.