From 74fab559483d01be0ad67ae68585f8a92721422a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 6 Feb 2012 14:34:42 +0530 Subject: [PATCH] add home in website patch --- erpnext/patches/jan_mar_2012/latest/website.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/erpnext/patches/jan_mar_2012/latest/website.py b/erpnext/patches/jan_mar_2012/latest/website.py index a6f1310ee0..cd40ccbb87 100644 --- a/erpnext/patches/jan_mar_2012/latest/website.py +++ b/erpnext/patches/jan_mar_2012/latest/website.py @@ -38,6 +38,21 @@ def execute(): reload_doc('website', 'page', 'products') reload_doc('website', 'page', 'unsubscribe') + create_home_page() + +def create_home_page(): + """create a dummy home page""" + if not webnotes.conn.sql("""select name from `tabWeb Page` where name='home'""") + d = Document('Web Page') + d.title = 'Home' + d.head_section = "

Your Headline

" + d.main_section = "

Some introduction about your company

" + d.side_section = "

Links to other pages

" + d.save() + obj = get_obj(doc = d) + obj.validate() + obj.doc.save() + def add_website_manager(): """add website manager to system manager""" for i in webnotes.conn.sql("""select distinct parent from tabUserRole