Jump to content


Photo

Chapter 7 Page 241

Chapter 7 page 241 generate_list.py

  • Please log in to reply
No replies to this topic

#1 jerry_jsi

jerry_jsi

    New Member

  • Members
  • Pip
  • 1 posts

Posted 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...Selection_014.jpg

Edited by jerry_jsi, 27 July 2015 - 11:20 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users