瀏覽代碼

[fix] jinja

version-14
Rushabh Mehta 10 年之前
父節點
當前提交
5ea8896b1a
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      frappe/utils/jinja.py

+ 2
- 1
frappe/utils/jinja.py 查看文件

@@ -24,7 +24,8 @@ def get_template(path):
return get_jenv().get_template(path) return get_jenv().get_template(path)


def render_template(template, context): def render_template(template, context):
context.update(get_allowed_functions_for_jenv())
if not "frappe" in context:
context.update(get_allowed_functions_for_jenv())
template = Template(template) template = Template(template)
return template.render(**context) return template.render(**context)




Loading…
取消
儲存