Ejemplo n.º 1
0
#! /usr/local/bin/python3 
import yate
print(yate.start_response('text/html')) 
print(yate.do_form('add_timing_data.py', ['TimeValue'], text='Send'))
Ejemplo n.º 2
0
#!/usr/local/bin/python3

import yate

print(yate.start_response('text/html'))
print(yate.do_form('add_timing_data_test.py', ['TimeValue'], text='Send'))
Ejemplo n.º 3
0
import yate, cgi
import athletemodel
form = cgi.FieldStorage()
the_id = form['which_athlete'].value
# the_athletes_name=athletemodel.
print(yate.start_response())
print(yate.include_header("Add a timing data"))
print(
    yate.do_form('add_timing_data.py',
                 the_inputs=[[the_id], ['TimeValue']],
                 method='post',
                 text='Send'))
Ejemplo n.º 4
0
# -*- coding:utf-8 -*-
import yate

print(yate.start_response())
print(yate.do_form("add_timing_data.py", ['TimeValue'], text="Send"))
Ejemplo n.º 5
0
#1 /usr/local/bin/python3

import yate

print(yate.start_response('text/html'))
print(yate.do_form('add_timing_data.py', ['TimeValue'], text='Send'))	# dynamically create the form, supplying any arguments as required
Ejemplo n.º 6
0
import yate
import cgitb

# 打开调试
cgitb.enable()

# 输出
print(yate.start_response())
print(yate.do_form("/cgi-bin/add_timing_data.py", ['TimeValue'], text = 'Send'))
Ejemplo n.º 7
0
#! /usr/local/bin/python3

import yate

print(yate.start_response('text/html'))
print(yate.do_form('add_timing_data.py', ['TimeValue'], text="Send"))
Ejemplo n.º 8
0
#! /usr/local/bin/python3

import yate
import cgi
import os

form = cgi.FieldStorage()
athlete_id = form.getvalue('AthleteId')

print(yate.start_response('text/html'))
# 打印所有环境变量,参考http://www.runoob.com/python/python-cgi.html
# for key in os.environ.keys():
#     print(yate.para(key + "=" + os.environ[key]))
print(
    yate.do_form('add_timing_data.py?AthleteId=' + str(athlete_id), ['Time'],
                 text='Send'))
Ejemplo n.º 9
0
#!/usr/bin/env python

import yate

print(yate.start_response('text/html'))
print(yate.do_form('add_timing_data.py', ['TimeValue'], text='Submit'))
Ejemplo n.º 10
0
import yate
import cgitb
cgitb.enable()

print(yate.start_response("text/html"))
print(yate.include_header("Coach Kelly's List of Athletes"))
print(yate.do_form("add_timing_data.py", ['TimeValue'], submit_txt='Send'))
print(yate.include_footer({"HOME": "/index.html"}))
Ejemplo n.º 11
0
import yate

print(yate.start_response("text/html"))
print(yate.do_form("add_timing_data.py", {"TimeValue": "80"}, text="Send"))
Ejemplo n.º 12
0
import cgi
import yate
import cgitb
cgitb.enable()
print(yate.start_response("text/html"))
print(yate.do_form("add_timing_data.py",["TimeValue"],text="Send"))
Ejemplo n.º 13
0
#! /usr/bin/env python

import yate

print yate.start_response()
print yate.do_form('add_timing_data.py', ['TimeValue'], text='Send')
#! /usr/bin/env python
import cgitb
cgitb.enable()
import cgi
import yate
import athletemodel

form_data = cgi.FieldStorage()
if "which_athlete" not in form_data:
    print "<H1>Error</H1>"
    print "Please choose one athlete."
athlete_id = form_data["which_athlete"].value
athlete = athletemodel.get_athlete_from_id(athlete_id)

print yate.start_response()
print yate.include_header("Coach Kelly's Timing Data")
print yate.header("Athlete:" + athlete['name'] + ", DOB:" + athlete['dob'] + ".")
print yate.para("The top times for " + athlete['name'] + " are:")
print yate.u_list(athlete['top3'])
print yate.para("The entire set of timing data is: " + str([float(item) for item in athlete['data']]) + " (duplicates removed).")
print yate.do_form("add_timing_data.py", [athlete_id], "post", "Add a new time");
print yate.include_footer({"Home":"../index.html", "Select another athlete":"generate_list.py"})
Ejemplo n.º 15
0
#! /usr/bin/python3

#import cgitb
#cgitb.enable()

import yate

print(yate.start_response('text/html'))
print(yate.do_form('add_timing_data.py', ['Athlete_id', 'Time'], text="Send"))