def get(self, key): user = User.get(key) if user != None: template_values = { 'user': user } self.Render("user.html", template_values)
def post(self, key): user = User.get(key) if user != None: action = self.request.get('action') if action == 'delete_user': user.murder(key) elif action == 'update_user': user.address = self.request.get('address').strip() user.nick = self.request.get('nick').strip() user.email_addresses = self.request.get('email_addresses') user.put() self.get(key)