haml-scss 0.7.8

Haml for Python
haml-scss is a Python module that provides haml and scss (for Python).

There are a few other implementations, but didn't seem to support as many features of haml as well as integrating well with typical python template languages. This was written with Django in mind, but made room for other python web frameworks to integrate. Eventually, modules similar to the haml/dj.py for Django will be included with this package for each framework because easy integration is important for adoption.

Probably the main difference between this library and the actual haml ruby implementation is that this implementation strives to "compile" into a different template language and let the underlying template engine (like Jinja2 and Django's default) do what they do best.

Django Installation/Setup

In settings.py, modify TEMPLATE_LOADERS like:

TEMPLATE_LOADERS = (
 'haml.dj.FSLoader',
 'haml.dj.AppLoader',
)


These replace your usual Django loaders:

django.template.loaders.filesystem.Loader
django.template.loaders.app_directories.Loader


Now simply name your templates with a .haml extension and this haml compiler will do the rest. Any templates with other extensions will not be compiled with the haml compiler.

last updated on:
March 23rd, 2012, 10:36 GMT
price:
FREE!
developed by:
Dan LaMotte
license type:
Other/Proprietary License
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT