diff --git a/webnotes/__init__.py b/webnotes/__init__.py index 05847949f3..b24829b536 100644 --- a/webnotes/__init__.py +++ b/webnotes/__init__.py @@ -199,7 +199,7 @@ def throw(msg, exc=ValidationError): def create_folder(path): if not os.path.exists(path): os.makedirs(path) - + def connect(site=None, db_name=None): from db import Database if site: @@ -546,13 +546,14 @@ def get_jenv(): return jenv def set_filters(jenv): - from webnotes.utils import global_date_format + from webnotes.utils import global_date_format, scrub_relative_url from markdown2 import markdown from json import dumps jenv.filters["global_date_format"] = global_date_format jenv.filters["markdown"] = markdown jenv.filters["json"] = dumps + jenv.filters["scrub_relative_url"] = scrub_relative_url # load jenv_filters from hooks.txt for app in get_all_apps(True): diff --git a/webnotes/handler.py b/webnotes/handler.py index 95d28e6631..32e3de074f 100755 --- a/webnotes/handler.py +++ b/webnotes/handler.py @@ -171,7 +171,7 @@ def print_json(): make_logs() cleanup_docs() - webnotes._response.headers["Content-Type"] = "text/json; charset: utf-8" + webnotes._response.headers["Content-Type"] = "application/json; charset: utf-8" import json diff --git a/webnotes/hooks.txt b/webnotes/hooks.txt index de96d2d02e..6d9d5c5b81 100644 --- a/webnotes/hooks.txt +++ b/webnotes/hooks.txt @@ -8,11 +8,16 @@ app_color = #3498db after_install = webnotes.utils.install.after_install +# website app_include_js = assets/js/webnotes.min.js 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 + get_desktop_icons = webnotes.manage.get_desktop_icons notification_config = webnotes.core.notifications.get_notification_config @@ -26,7 +31,7 @@ on_session_creation = webnotes.auth.notify_administrator_login # permissions permission_query_conditions:Event = webnotes.core.doctype.event.event.get_permission_query_conditions -has_permission:Event = webnotes.core.doctype.event.event.has_permission +has_permission:Event = webnotes.core.doctype.event.event.has_permission permission_query_conditions:ToDo = webnotes.core.doctype.todo.todo.get_permission_query_conditions -has_permission:ToDo = webnotes.core.doctype.todo.todo.has_permission \ No newline at end of file +has_permission:ToDo = webnotes.core.doctype.todo.todo.has_permission \ No newline at end of file diff --git a/webnotes/templates/base.html b/webnotes/templates/base.html index b6b614324f..8f99736519 100644 --- a/webnotes/templates/base.html +++ b/webnotes/templates/base.html @@ -6,37 +6,51 @@