コード例 #1
0
import glob

from lib import athletemodel
from templates import yate

data_files = glob.glob("data/*.txt")
athletes_info = athletemodel.get_namesID_from_store()

print(yate.start_response())

print(yate.include_header("Coach Martin's List of Athletes"))

print(yate.start_form("adding_time.py"))

print(yate.para("Select an athlete from the list to add time:"))
for each_athlete in athletes_info:
    print(
        yate.radio_button("which_athlete", each_athlete['name'],
                          each_athlete['ID']))

print(yate.text_field("athlete_new_time", "athlete_new_time"))

print(yate.end_form("Select"))

print(
    yate.include_footer({
        "Home": "/index.html",
        "Show timing athlete": "generate_list.py"
    }))
コード例 #2
0
from templates import yate
from images import GeneradorGraficas

cgitb.enable()

form_data = cgi.FieldStorage()
athlete_ID = form_data['ID'].value

athlete_info = athletemodel.get_athlete_from_id(athlete_ID)

print(yate.start_response())

print(yate.start_form("ConfirmarBorrado.py"))

print(yate.include_header("Tiempos para " + athlete_info['Name']))

print(yate.para("Seleccionar la marca que se quiere borrar:"))

for data in athlete_info['data']:
    print(yate.radio_button("Tiempo", "", data))

print(yate.hidden_input("ID", athlete_ID))

print(yate.end_form("Aceptar"))

print(
    yate.include_footer({
        "Seleccinar otro atleta":
        "/cgi-bin/BorrarTiempoAtleta/MostrarySeleccionarAtleta.py"
    }))
print(yate.include_footer({"Indice": "/cgi-bin/indice.py"}))
コード例 #3
0
'''
Created on 13 may. 2016

@author: Manuel
'''
import glob

from lib import athletemodel
from templates import yate

data_files = glob.glob("data/*.txt")
athletes_info = athletemodel.get_namesID_from_store()

print(yate.start_response())

print(yate.include_header("Registro de atletas"))

print(yate.start_form("generate_timing_data.py"))

print(yate.para("Selecciona el atleta del cual deseas ver los tiempos:"))
for each_athlete in athletes_info:
    print(yate.radio_button("ID", each_athlete['name'], each_athlete['ID']))

print(yate.end_form("Aceptar"))

print(yate.include_footer({"Indice": "/cgi-bin/indice.py"}))