2013-11-20 07:29:58 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-08-05 09:29:54 +00:00
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2013-03-11 08:59:09 +00:00
|
|
|
import webnotes
|
|
|
|
|
|
|
|
def execute():
|
|
|
|
webnotes.reload_doc('website', 'doctype', 'blogger')
|
|
|
|
webnotes.rename_doc("DocType", "Blog", "Blog Post", force=True)
|
2013-03-11 09:06:12 +00:00
|
|
|
webnotes.reload_doc('website', 'doctype', 'blog_post')
|
2013-03-11 09:05:25 +00:00
|
|
|
webnotes.conn.sql('''update tabBlogger set posts=(select count(*)
|
|
|
|
from `tabBlog Post` where ifnull(blogger,"")=tabBlogger.name)''')
|
2013-03-12 05:14:35 +00:00
|
|
|
webnotes.conn.sql("""update `tabBlog Post` set published_on=date(creation)""")
|