html generation moved from web.py to web_cache.py so it can be called from other places as a response from server.py
diff --git a/erpnext/website/web_cache.py b/erpnext/website/web_cache.py
index 893f7f2..e08499b 100644
--- a/erpnext/website/web_cache.py
+++ b/erpnext/website/web_cache.py
@@ -91,6 +91,7 @@
return page_list
def prepare_args(page_name):
+ import webnotes
if page_name == 'index':
page_name = get_home_page()
@@ -98,6 +99,7 @@
args = {
'template': 'pages/%s.html' % page_name,
'name': page_name,
+ 'webnotes': webnotes
}
else:
args = get_doc_fields(page_name)