diff --git a/webnotes/__init__.py b/webnotes/__init__.py index b24829b536..6ffae8fd8a 100644 --- a/webnotes/__init__.py +++ b/webnotes/__init__.py @@ -532,14 +532,14 @@ jenv = None def get_jenv(): global jenv if not jenv: - from jinja2 import Environment, ChoiceLoader, PackageLoader + from jinja2 import Environment, ChoiceLoader, PackageLoader, DebugUndefined apps = get_installed_apps() apps.remove("webnotes") # webnotes will be loaded last, so app templates will get precedence jenv = Environment(loader = ChoiceLoader([PackageLoader(app, ".") \ - for app in apps + ["webnotes"]])) + for app in apps + ["webnotes"]]), undefined=DebugUndefined) set_filters(jenv) diff --git a/webnotes/core/doctype/page/page.py b/webnotes/core/doctype/page/page.py index 515f73fb03..c85bf22629 100644 --- a/webnotes/core/doctype/page/page.py +++ b/webnotes/core/doctype/page/page.py @@ -38,7 +38,6 @@ class DocType: make_module_and_roles(self.doclist, "Page Role") if not webnotes.flags.in_import and getattr(conf,'developer_mode', 0) and self.doc.standard=='Yes': - print "here" from webnotes.modules.export_file import export_to_files from webnotes.modules import get_module_path, scrub import os diff --git a/webnotes/hooks.txt b/webnotes/hooks.txt index 6d9d5c5b81..7a361a83f6 100644 --- a/webnotes/hooks.txt +++ b/webnotes/hooks.txt @@ -14,9 +14,10 @@ app_include_css = assets/webnotes/css/splash.css app_include_css = assets/css/webnotes.css web_include_js = assets/js/webnotes-web.min.js web_include_css = assets/css/webnotes-web.css -website_group_views:Forum = webnotes.templates.website_group.forum.get_views -website_group_views:Events = webnotes.templates.website_group.events.get_views -website_group_views:Tasks = webnotes.templates.website_group.tasks.get_views + +website_group_handler:Forum = webnotes.templates.website_group.forum +website_group_handler:Events = webnotes.templates.website_group.events +website_group_handler:Tasks = webnotes.templates.website_group.tasks get_desktop_icons = webnotes.manage.get_desktop_icons notification_config = webnotes.core.notifications.get_notification_config diff --git a/webnotes/templates/base.html b/webnotes/templates/base.html index 8f99736519..1a74f77e31 100644 --- a/webnotes/templates/base.html +++ b/webnotes/templates/base.html @@ -11,7 +11,7 @@ {%- block head -%} - {%- if meta_description -%} + {%- if meta_description is defined -%} {%- endif -%} @@ -25,13 +25,13 @@ {%- endblock -%} {%- block javascript -%} - {%- if javascript -%} + {%- if javascript is defined -%} {%- endif -%} {%- endblock -%} {%- block css -%} - {%- if css -%} + {%- if css is defined -%} {%- endif -%} {%- endblock -%} @@ -39,18 +39,38 @@ {%- block style -%}{%- endblock -%}
- {%- block banner -%} - {% if banner_html -%} -