refactored website

This commit is contained in:
Rushabh Mehta
2012-12-06 16:15:38 +05:30
parent 89c7b41fee
commit df0b00a981
12 changed files with 296 additions and 689 deletions

View File

@@ -147,19 +147,14 @@ def add_subscriber():
def get_blog_content(blog_page_name):
import website.web_cache
content = website.web_cache.get_html(blog_page_name)
content = split_blog_content(content)
import webnotes.utils
content = webnotes.utils.escape_html(content)
return content
def split_blog_content(content):
content = content.split("<!-- begin blog content -->")
content = len(content) > 1 and content[1] or content[0]
content = content.split("<!-- end blog content -->")
content = content[0]
return content