Jump to content


jerry_jsi

Member Since 27 Jul 2015
Offline Last Active Jul 28 2015 11:06 AM
-----

Topics I've Started

Chapter 7 Page 241

27 July 2015 - 11:19 AM

so my generate_list.py executes perfectly with the following output

 

Content-type: text/html
 
 
<html>
<head>
<title>Coach Kelly's list of athletes</title>
<link type="text/css" rel="stylesheet" href="/coach.css" />
</head>
<body>
<h1>Coach Kelly's list of athletes</h1>
 
<p>Select an Athlete to work with</p>
<input type="radio" name="which_athlete" value="Mikey McManus"> Mikey McManus<br />
<input type="radio" name="which_athlete" value="Julie Jones"> Julie Jones<br />
<input type="radio" name="which_athlete" value="Sarah Sweeney"> Sarah Sweeney<br />
<input type="radio" name="which_athlete" value="James Lee"> James Lee<br />
<form action="generate_timing_data.py" method="POST">
<p></p><input type=submit value="Select"></form>
<p>
<a href="/index.html">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;
</p>
</body>
</html>
 
 
but somehow the webpage doesnt display the radio buttons
 
here's the code : 
 
#! /usr/bin/python3
import yate
import athletemodel
import glob
 
data_files=glob.glob("../data/*.txt")
athletes=athletemodel.put_to_store(data_files)
print(yate.start_response())
print(yate.include_header("Coach Kelly's list of athletes"))
print(yate.para("Select an Athlete to work with"))
 
for each in athletes:
print(yate.radio_button("which_athlete",athletes[each].name))
print(yate.start_form("generate_timing_data.py"))
print(yate.end_form("Select"))
print(yate.include_footer({"Home":"/index.html"}))
 
its the same on all browsers...Attached File  Selection_014.jpg   55.93KB   36 downloads