def post(self): form = cgi.FieldStorage() thefile = form['file-0'] iter_html=loop_html(thefile) templatepath = os.path.dirname(__file__) + '/../templates/' ChkCookie = self.request.cookies.get("ubercookie") # html = uber_lib.SkinChk(ChkCookie) # html = html + template.render(templatepath + '02uberintroblock_wmodellinks.html', {'model':'therps','page':'batchinput'}) # html = html + template.render (templatepath + '03ubertext_links_left.html', {}) html = template.render(templatepath + '04uberbatch_start.html', { 'model':'therps', 'model_attributes':'T-Herps Batch Output'}) html = html + therps_tables.timestamp("",jid_batch[0]) html = html + iter_html #html = html + template.render(templatepath + 'export.html', {}) html = html + template.render(templatepath + '04uberoutput_end.html', {'sub_title': ''}) # html = html + template.render(templatepath + '06uberfooter.html', {'links': ''}) rest_funcs.batch_save_dic(html, [x.__dict__ for x in therps_obj_all], 'therps', 'batch', jid_batch[0], ChkCookie, templatepath) self.response.out.write(html)
def post(self): form = cgi.FieldStorage() thefile = form["file-0"] iter_html = loop_html(thefile) templatepath = os.path.dirname(__file__) + "/../templates/" ChkCookie = self.request.cookies.get("ubercookie") # html = uber_lib.SkinChk(ChkCookie) # html = html + template.render(templatepath + '02uberintroblock_wmodellinks.html', {'model':'dust','page':'batchinput'}) # html = html + template.render (templatepath + '03ubertext_links_left.html', {}) html = template.render( templatepath + "04uberbatch_start.html", {"model": "dust", "model_attributes": "DUST Batch Output"} ) html = html + dust_tables.timestamp("", jid_batch[0]) html = html + iter_html html = html + template.render(templatepath + "04uberoutput_end.html", {"sub_title": ""}) # html = html + template.render(templatepath + '06uberfooter.html', {'links': ''}) rest_funcs.batch_save_dic( html, [x.__dict__ for x in dust_obj_all], "dust", "batch", jid_batch[0], ChkCookie, templatepath ) self.response.out.write(html)
def post(self): # text_file1 = open('terrplant/terrplant_description.txt','r') # x = text_file1.read() form = cgi.FieldStorage() logger.info(form) thefile = form['file-0'] iter_html=loop_html(thefile) templatepath = os.path.dirname(__file__) + '/../templates/' ChkCookie = self.request.cookies.get("ubercookie") # html = uber_lib.SkinChk(ChkCookie) # html = html + template.render(templatepath + '02uberintroblock_wmodellinks.html', {'model':'terrplant','page':'batchinput'}) # html = html + template.render (templatepath + '03ubertext_links_left.html', {}) html = template.render(templatepath + '04uberbatch_start.html', { 'model':'terrplant', 'model_attributes':'TerrPlant Batch Output'}) html = html + iter_html # html = html + template.render(templatepath + 'terrplant-batchoutput-jqplot.html', {}) html = html + template.render(templatepath + '04uberoutput_end.html', {'sub_title': ''}) # html = html + template.render(templatepath + '06uberfooter.html', {'links': ''}) rest_funcs.batch_save_dic(html, [x.__dict__ for x in terr_all], 'terrplant', 'batch', jid_batch[0], ChkCookie, templatepath) self.response.out.write(html)
def post(self): form = cgi.FieldStorage() thefile = form['file-0'] iter_html=loop_html(thefile) templatepath = os.path.dirname(__file__) + '/../templates/' ChkCookie = self.request.cookies.get("ubercookie") html = template.render(templatepath + '04uberoutput_start.html', { 'model':'geneec', 'model_attributes':'Geneec Batch Output'}) html= html + """ <div class="out_"> <b>GENEEC Version 2.0 (Beta)<br> </div>""" html = html + "".join(iter_html.values()) html = html + template.render(templatepath + '04uberoutput_end.html', {'sub_title': ''}) # logger.info(iter_html.keys()) # logger.info(len(iter_html.keys())) rest_funcs.batch_save_dic(html, [x.__dict__ for x in geneec_obj_all], 'geneec', 'batch', jid_batch[0], ChkCookie, templatepath) self.response.out.write(html)