From a297dadfe4ae8e7adab715b048ab9ba81427258c Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 6 Dec 2012 16:15:37 +0530 Subject: [PATCH 1/5] refactored website --- webnotes/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webnotes/__init__.py b/webnotes/__init__.py index 68d1efc618..1c872fed15 100644 --- a/webnotes/__init__.py +++ b/webnotes/__init__.py @@ -306,7 +306,9 @@ def reload_doc(module, dt=None, dn=None): import webnotes.modules return webnotes.modules.reload_doc(module, dt, dn) -from webnotes.model.rename_doc import rename_doc +def rename_doc(doctype, old, new, is_doctype=0, debug=0): + from webnotes.model.rename_doc import rename_doc + rename_doc(doctype, old, new, is_doctype, debug) def insert(doclist): import webnotes.model From ae6bd1a8497987e17858d24011c8c26394dcbd6e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 6 Dec 2012 16:47:12 +0530 Subject: [PATCH 2/5] sitemap / rss: path fix --- public/html/rss.xml | 4 ++-- public/html/sitemap.xml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/html/rss.xml b/public/html/rss.xml index efe083e1fc..5a5bff51a5 100755 --- a/public/html/rss.xml +++ b/public/html/rss.xml @@ -22,13 +22,13 @@ cgitb.enable() # import libs sys.path.append('..') -sys.path.append('../lib/py') +sys.path.append('../lib') +sys.path.append('../app') import webnotes import webnotes.auth import conf -sys.path.append(conf.modules_path) if __name__=='__main__': # webnotes.http_request = webnotes.auth.HTTPRequest() diff --git a/public/html/sitemap.xml b/public/html/sitemap.xml index 09ce39a8b9..abc96ec399 100755 --- a/public/html/sitemap.xml +++ b/public/html/sitemap.xml @@ -21,7 +21,8 @@ cgitb.enable() # import libs sys.path.append('..') -sys.path.append('../lib/py') +sys.path.append('../lib') +sys.path.append('../app') import webnotes import webnotes.auth From 02e43dfb3cd8211205fa51a4a6a2e26bdd6554e0 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 6 Dec 2012 16:54:46 +0530 Subject: [PATCH 3/5] removed refresh_cache from wnf.py --- wnf.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/wnf.py b/wnf.py index 6e3dfe24f6..ded0f3866c 100755 --- a/wnf.py +++ b/wnf.py @@ -83,10 +83,6 @@ def rebuild(): # build js / css from webnotes.utils import bundlejs bundlejs.bundle(False) - - # build cache - import website.web_cache - website.web_cache.refresh_cache(['Blog']) def apply_latest_patches(): import webnotes.modules.patch_handler @@ -415,9 +411,6 @@ def run(): import webnotes.cms.make webnotes.cms.make.make() - import website.web_cache - website.web_cache.refresh_cache(['Blog']) - elif options.clear_cache: clear_cache() From ed34e0ebe5cfcc25e76f728979001d9a67dc18c8 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 6 Dec 2012 16:59:51 +0530 Subject: [PATCH 4/5] fix in smalltext formatter --- public/js/wn/form/formatters.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/wn/form/formatters.js b/public/js/wn/form/formatters.js index e5ff50eadf..760cd15faf 100644 --- a/public/js/wn/form/formatters.js +++ b/public/js/wn/form/formatters.js @@ -48,6 +48,9 @@ wn.form.formatters = { }); return html; }, + SmallText: function(value) { + return wn.formatters.Text(value); + }, WorkflowState: function(value) { workflow_state = wn.meta.get("Workflow State", value)[0]; if(workflow_state) { @@ -66,5 +69,5 @@ wn.form.formatters = { } wn.form.get_formatter = function(fieldtype) { - return wn.form.formatters[fieldtype] || wn.form.formatters.Data; + return wn.form.formatters[fieldtype.replace(/ /g, "")] || wn.form.formatters.Data; } \ No newline at end of file From aa918e8bc28c1d2f8bbddbd1c6181b009360268a Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 6 Dec 2012 17:01:49 +0530 Subject: [PATCH 5/5] fix in print formatter --- public/js/wn/form/formatters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/wn/form/formatters.js b/public/js/wn/form/formatters.js index 760cd15faf..8404dd84fd 100644 --- a/public/js/wn/form/formatters.js +++ b/public/js/wn/form/formatters.js @@ -49,7 +49,7 @@ wn.form.formatters = { return html; }, SmallText: function(value) { - return wn.formatters.Text(value); + return wn.form.formatters.Text(value); }, WorkflowState: function(value) { workflow_state = wn.meta.get("Workflow State", value)[0];