haml-scss 0.7.8

Haml for Python

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
Other/Proprietary License
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Dan LaMotte
HOMEPAGE:
bitbucket.org
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
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

requirements limitations

#Python haml #Django template #Python scss #haml #scss #sass #Django

Add your review!

SUBMIT