added guest read permission to blog

This commit is contained in:
Anand Doshi
2012-07-27 14:39:27 +05:30
parent adc6c7c02b
commit b3a4c09e07
5 changed files with 27 additions and 19 deletions

View File

@@ -34,6 +34,8 @@ def get_blog_list(args=None):
from webnotes.utils import global_date_format, get_fullname
res['full_name'] = get_fullname(res['owner'])
res['published'] = global_date_format(res['published'])
if not res['content']:
res['content'] = website.web_cache.get_html(res['name'])
res['content'] = split_blog_content(res['content'])
res['content'] = res['content'][:1000]
@@ -94,9 +96,6 @@ def add_comment(args=None):
website.web_cache.clear_cache(args.get('page_name'),
args.get('comment_doctype'), args.get('comment_docname'))
# loads fresh blog into cache
get_blog_content(args.get('page_name'))
import webnotes.utils
comment['comment_date'] = webnotes.utils.pretty_date(comment['creation'])