コード例 #1
0
ファイル: fdadiet_output.py プロジェクト: hongtao510/u_tool
    def post(self):
        form = cgi.FieldStorage()

        chemical_name = form.getvalue('chemical_name')
        trade_name = form.getvalue('trade_name')
        run_use = form.getvalue('run_use')
        atuse_conc = float(form.getvalue('atuse_conc'))
        residue = float(form.getvalue('residue'))
        worst_case_est = float(form.getvalue('worst_case_est'))
        vol = float(form.getvalue('vol'))
        d = form.getvalue('d')
        h = form.getvalue('h')
        sa = form.getvalue('sa')
        intake_avg = float(form.getvalue('intake_avg'))
        intake_90th = float(form.getvalue('intake_90th'))

        fdadiet_obj = fdadiet_model.fdadiet(True,True,chemical_name,trade_name,run_use,atuse_conc,residue,worst_case_est,vol,d,h,sa,intake_avg,intake_90th)

        templatepath = os.path.dirname(__file__) + '/../templates/'
        html = template.render(templatepath + '01hh_uberheader.html', {'title':'Ubertool'})        
        html = html + template.render(templatepath + '02hh_uberintroblock_wmodellinks.html',  {'model':'fdadiet','page':'output'})
        html = html + template.render (templatepath + '03hh_ubertext_links_left.html', {})                               
        html = html + template.render(templatepath + '04uberoutput_start.html', {
                'model':'fdadiet', 
                'model_attributes':'FDA Dietary Exposure Model Output'})
        html = html + fdadiet_tables.timestamp()
        html = html + fdadiet_tables.table_all(fdadiet_obj)
        html = html + template.render(templatepath + 'export.html', {})
        html = html + template.render(templatepath + '04uberoutput_end.html', {})
        html = html + template.render(templatepath + '06hh_uberfooter.html', {'links': ''})
        self.response.out.write(html)
コード例 #2
0
ファイル: fdadiet_qaqc.py プロジェクト: hongtao510/u_tool
 def get(self):
     templatepath = os.path.dirname(__file__) + '/../templates/'
     html = template.render(templatepath + '01hh_uberheader.html', 'title')
     html = html + template.render(templatepath + '02hh_uberintroblock_wmodellinks.html', {'model':'fdadiet','page':'qaqc'})
     html = html + template.render (templatepath + '03hh_ubertext_links_left.html', {})                
     html = html + template.render(templatepath + '04uberoutput_start.html', {
             'model':'fdadiet',
             'model_attributes':'FDA Dietary Exposure Model QAQC'})
     html = html + fdadiet_tables.timestamp()
     html = html + fdadiet_tables.table_all_qaqc(fdadiet_obj)
     html = html + template.render(templatepath + 'export.html', {})
     html = html + template.render(templatepath + '04uberoutput_end.html', {'sub_title': ''})
     html = html + template.render(templatepath + '06hh_uberfooter.html', {'links': ''})
     self.response.out.write(html)
コード例 #3
0
 def post(self):
     form = cgi.FieldStorage()
     thefile = form['upfile']
     iter_html=loop_html(thefile)
     templatepath = os.path.dirname(__file__) + '/../templates/'
     html = template.render(templatepath + '01hh_uberheader.html', 'title')
     html = html + template.render(templatepath + '02hh_uberintroblock_wmodellinks.html', {'model':'fdadiet','page':'qaqc'})
     html = html + template.render (templatepath + '03hh_ubertext_links_left.html', {})                
     html = html + template.render(templatepath + '04uberoutput_start.html', {
             'model':'fdadiet',
             'model_attributes':'FDA Dietary Exposure Model QAQC'})
     html = html + fdadiet_tables.timestamp()
     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 + '06hh_uberfooter.html', {'links': ''})
     self.response.out.write(html)