fix in blog caching

This commit is contained in:
Anand Doshi 2012-07-13 01:32:23 +05:30
parent 970988664a
commit 51eb8a18ba
2 changed files with 7 additions and 0 deletions

View File

@ -33,6 +33,9 @@ class DocType(website.web_page.Page):
super(DocType, self).on_update()
if not webnotes.utils.cint(self.doc.published):
self.delete_web_cache(self.doc.page_name)
else:
import website.blog
website.blog.get_blog_content(self.doc.page_name)
def prepare_template_args(self):
import webnotes.utils

View File

@ -36,6 +36,10 @@ class DocType:
import website.web_cache
website.web_cache.refresh_cache()
# create blog pages
import webnotes.cms.feed
webnotes.cms.feed.generate()
from webnotes.session_cache import clear_cache
clear_cache('Guest')