#NEWLINE# def on_update( self ) : #NEWLINE# #INDENT# '\n\t\t\tWrites the .txt for this page and if write_content is checked,\n\t\t\tit will write out a .html file\n\t\t' #NEWLINE# from frappe.core.doctype.doctype.doctype import make_module_and_roles #NEWLINE# make_module_and_roles ( self , 'roles' ) #NEWLINE# if ( ( not frappe . flags . in_import ) and getattr ( conf , 'developer_mode' , 0 ) and ( path . standard == 'Yes' ) ) : #NEWLINE# #INDENT# from frappe.modules.export_file import export_to_files #NEWLINE# from frappe.modules import get_module_path , scrub #NEWLINE# import os #NEWLINE# export_to_files ( record_list = [ [ 'Page' , self . name ] ] ) #NEWLINE# path = os . path . join ( get_module_path ( self . module ) , 'page' , scrub ( self . name ) , scrub ( self . name ) ) #NEWLINE# if ( not os . path . exists ( ( path + '.js' ) ) ) : #NEWLINE# #INDENT# with open ( ( path + '.js' ) , 'w' ) as f : #NEWLINE# #INDENT# f . write ( ( "frappe.pages['%s'].on_page_load = function(wrapper) {\n\tvar page = frappe.ui.make_app_page({\n\t\tparent: wrapper,\n\t\ttitle: '%s',\n\t\tsingle_column: true\n\t});\n}" % ( self . name , self . title ) ) )