renamed blog to blog_post and refresh issues

This commit is contained in:
Rushabh Mehta
2013-03-11 14:29:09 +05:30
parent 6316e872cd
commit b8ec3e7ecb
26 changed files with 66 additions and 162 deletions

View File

@@ -9,10 +9,14 @@ class DocType:
def on_update(self):
"if profile is set, then update all older blogs"
from website.helpers.blog import clear_blog_cache
clear_blog_cache()
if self.doc.profile:
for blog in webnotes.conn.sql_list("""select name from tabBlog where owner=%s
for blog in webnotes.conn.sql_list("""select name from `tabBlog Post` where owner=%s
and ifnull(blogger,'')=''""", self.doc.profile):
b = webnotes.bean("Blog", blog)
b = webnotes.bean("Blog Post", blog)
b.doc.blogger = self.doc.name
b.save()

View File

@@ -1,8 +1,8 @@
[
{
"creation": "2013-03-07 16:28:19",
"creation": "2013-03-08 11:36:52",
"docstatus": 0,
"modified": "2013-03-07 16:33:37",
"modified": "2013-03-11 14:00:37",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -73,6 +73,13 @@
"label": "Avatar",
"options": "attach_files:"
},
{
"doctype": "DocField",
"fieldname": "posts",
"fieldtype": "Int",
"label": "Posts",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "file_list",