product listing and pages

This commit is contained in:
Anand Doshi
2012-06-27 12:06:45 +05:30
parent 10bcf5ea25
commit bba4db1627
11 changed files with 201 additions and 44 deletions

View File

@@ -48,13 +48,26 @@ def get_html(page_name):
page_name = scrub_page_name(page_name)
if page_name == '404':
comments = """error: %s""" % webnotes.getTraceback()
template = '404.html'
traceback = webnotes.getTraceback()
# script is used to display traceback in error console
args = {
'comments': """error: %s""" % traceback,
'template': '404.html',
}
# 'script': """(function() {
# var error = "ERROR: %s";
# console.log(error);
# })();""" % traceback.replace('"', '\\"').replace('\n', ' \\\n'),
# }
else:
comments = """page: %s""" % page_name
template = 'page.html'
args = {
'comments': """page: %s""" % page_name,
'template': 'page.html',
}
html = website.web_cache.load_from_web_cache(page_name, comments, template)
html = website.web_cache.load_from_web_cache(page_name, **args)
return html