def post(self): from models import Prerequisites, Course course = Course.gql("WHERE number='{}'".format(self.request.get('course'))).get() prereq = Course.gql("WHERE number='{}'".format(self.request.get('prerequisite'))).get() p = Prerequisites(course=course, prereq=prereq) p.put()
def get(self): from models import Prerequisites Prereqs = Prerequisites.all().fetch(limit=200) self.response.out.write('<br><br>'.join(map(repr, Prereqs)))