def index(self, num=None, dep=None, level=None): # Note the way we link to the extra links page (and back). request = cherrypy.request if request.method == 'POST': num = request.params['num'] top = functions.pagetop() dep = request.params['dep'] level = request.params['level'] return top+'<table>'+str(list(self.courses(dep, level)))+'</table>'+ functions.pagebase() return functions.pagetop()+''' <form method="POST" action = '/Ranker/'> <h2>Course ranker function:</h2> <table> <tr><td>Course Number: <td><input type="text" id="num" name="num"></td> <tr><td>Departement: <td><select id="dep" name="dep"><option value=""></option>'''+str(list(functions.departments()))+'''</select></td> <tr><td>Level: <td><input type="radio" id="level" name="level" value="" checked>all <input type="radio" id="level" name="level" value="bsc">Bsc <input type="radio" id="level" name="level" value="ms">Master <input type="radio" id="level" name="level" value="phd">Phd</td> </table> <p><input type="reset" value="Reset"> <input type="submit" value="Submit"></p> </form>'''+functions.pagebase()
def index(self,num=None): # Note the relative link back to the Links page! request = cherrypy.request if request.method == 'POST': top = functions.pagetop() return top+''' blah blah blah ceci est le resultat suggestor!!!'''+ functions.pagebase() return functions.pagetop()+'''<form method="POST" action = '/Suggestor/'> <h2>Course suggestor function:</h2> <table> <tr><td>Course Number: <td><input type="text" id="num" name="num"></td> <tr><td>Departement: <td><select id="dep" name="dep"><option value=""></option>'''+str(list(functions.departments()))+'''</select></td> <tr><td>Level: <td><input type="radio" id="level" name="level" value="" checked>all <input type="radio" id="level" name="level" value="bsc">Bsc <input type="radio" id="level" name="level" value="ms">Master <input type="radio" id="level" name="level" value="phd">Phd</td> </table> <p><input type="reset" value="Reset"> <input type="submit" value="Submit"></p> </form>'''+functions.pagebase()