from commands import getoutput def record_comments(req): name = req.form.getfirst('name','') presentation = req.form.getfirst('presentation','') q1 = req.form.getfirst('q1','') q2 = req.form.getfirst('q2','') report = "Name: " + name report += "\nPresentation: " + presentation report += "\nDate: " + getoutput("date") report += "\nWhat did you like about this presentation? \n" + q1 report += "\nWhat questions were you left with after the presentation? \n" + q2 report += "\n\n" open("/home/seth/101comments", "a").write(report) return "Thank You!" def details(req): username = req.form.getfirst('submit','').split(" ")[0] query = 'select description from users where username = "%s"'%username db = msd.connect(host="localhost", user="seth", passwd="new alpaca twist freezer", db="sec") cur = db.cursor() cur.execute(query) return "We know you %s"%cur.fetchone()[0] def index(req): page = """\

Enter Comments for a Presentation Here

Your name is required so that I can give you credit for participation, but will not be revealed to the presenter. Pick two presentations to submit feedback for per presentation day, preferably two with topics you found interesting.
Your Name:
Presentation you are commenting on:
What did you like about this presentation?

What questions were you left with after the presentation?


""" return page