Rushabh Mehta | 40182ba | 2012-06-19 14:15:13 +0530 | [diff] [blame^] | 1 | def execute(): |
2 | import webnotes | ||||
3 | from webnotes.model.doclist import DocList | ||||
4 | import webnotes.model.sync | ||||
5 | |||||
6 | # sync web page doctype | ||||
7 | webnotes.model.sync.sync('website', 'web_page') | ||||
8 | |||||
9 | # save all web pages to create content | ||||
10 | for p in webnotes.conn.sql("""select name from `tabWeb Page` where docstatus=0"""): | ||||
11 | DocList('Web Page', p[0]).save() |