浏览代码

[fix] get_visible_columns in jinja.py

version-14
Rushabh Mehta 9 年前
父节点
当前提交
ede3a8ca05
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. +3
    -1
      frappe/__init__.py
  2. +1
    -1
      frappe/utils/jinja.py

+ 3
- 1
frappe/__init__.py 查看文件

@@ -173,7 +173,9 @@ def get_site_config(sites_path=None, site_path=None):
if os.path.exists(site_config): if os.path.exists(site_config):
config.update(get_file_json(site_config)) config.update(get_file_json(site_config))
elif local.site and not local.flags.new_site: elif local.site and not local.flags.new_site:
raise IncorrectSitePath, "{0} does not exist".format(site_config)
print "{0} does not exist".format(local.site)
sys.exit(1)
#raise IncorrectSitePath, "{0} does not exist".format(site_config)


return _dict(config) return _dict(config)




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

@@ -107,8 +107,8 @@ def get_allowed_functions_for_jenv():
} }


if not frappe.flags.in_setup_help: if not frappe.flags.in_setup_help:
out['get_visible_columns'] = frappe.get_attr("frappe.www.print.get_visible_columns")
out['frappe']['date_format'] = frappe.db.get_default("date_format") or "yyyy-mm-dd" out['frappe']['date_format'] = frappe.db.get_default("date_format") or "yyyy-mm-dd"
out['frappe']['get_visible_columns'] = frappe.get_attr("frappe.www.print.get_visible_columns")
out['frappe']["db"] = { out['frappe']["db"] = {
"get_value": frappe.db.get_value, "get_value": frappe.db.get_value,
"get_default": frappe.db.get_default, "get_default": frappe.db.get_default,


正在加载...
取消
保存