Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b09ce567da
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (13 sloc) 0.454 kb
"""
This module decorates the django templatize function to parse haml templates
before the translation utility extracts tags from it.
"""
from django.utils.translation import trans_real
import hamlpy
def decorate_templatize(func):
def templatize(src, origin=None):
hamlParser = hamlpy.Compiler()
html = hamlParser.process(src)
return func(html, origin)
return templatize
trans_real.templatize = decorate_templatize(trans_real.templatize)
Jump to Line
Something went wrong with that request. Please try again.