Created
July 28, 2013 09:32
-
-
Save blacktaxi/6098073 to your computer and use it in GitHub Desktop.
Super-hack to enable hamlish-jinja templates in Wok.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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