Trim blocks in Jinja2

This commit is contained in:
Noah 2016-06-03 15:07:02 -07:00
parent 646620fa92
commit fd21247fdf

View File

@ -64,6 +64,8 @@ template_paths = [
template_paths.extend(BLUEPRINT_PATHS) template_paths.extend(BLUEPRINT_PATHS)
app.jinja_loader = jinja2.ChoiceLoader([ jinja2.FileSystemLoader(x) for x in template_paths]) app.jinja_loader = jinja2.ChoiceLoader([ jinja2.FileSystemLoader(x) for x in template_paths])
app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
app.jinja_env.globals["csrf_token"] = rophako.utils.generate_csrf_token app.jinja_env.globals["csrf_token"] = rophako.utils.generate_csrf_token
app.jinja_env.globals["include_page"] = rophako.utils.include app.jinja_env.globals["include_page"] = rophako.utils.include
app.jinja_env.globals["settings"] = lambda: Config app.jinja_env.globals["settings"] = lambda: Config