Skip to content

Instantly share code, notes, and snippets.

@fisherds
Created September 15, 2014 03:50
Show Gist options
  • Select an option

  • Save fisherds/277178e0d3e9bc405677 to your computer and use it in GitHub Desktop.

Select an option

Save fisherds/277178e0d3e9bc405677 to your computer and use it in GitHub Desktop.
Post handler to Add a student to the GradeRecorder web app
class AddStudentAction(webapp2.RequestHandler):
def post(self):
user = users.get_current_user()
rose_username = self.request.get('rose_username')
new_student = Student(parent=utils.get_parent_key(user),
id=rose_username,
first_name=self.request.get('first_name'),
last_name=self.request.get('last_name'),
rose_username=rose_username,
team=self.request.get('team'))
new_student.put()
self.redirect("/")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment