Skip to content

Instantly share code, notes, and snippets.

@blacktaxi
Created July 28, 2013 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blacktaxi/6098073 to your computer and use it in GitHub Desktop.
Save blacktaxi/6098073 to your computer and use it in GitHub Desktop.
Super-hack to enable hamlish-jinja templates in Wok.
from hamlish_jinja import HamlishTagExtension
from jinja2.environment import load_extensions
def enable_haml(page):
env = page.__class__.tmpl_env
env.extensions = load_extensions(env, [HamlishTagExtension])
hooks = {
'page.meta.pre': [enable_haml]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment