def post(self, details_id): message = Register.get_by_id(int(details_id)) message.name = self.request.get("name") message.surname = self.request.get("surname") message.email = self.request.get("email") message.message = self.request.get("message") message.put() return self.redirect("/messages")
def edit_register(register_id): register = Register.get_by_id(register_id) form = RegisterForm(obj=example) if request.method == "POST": if form.validate_on_submit(): register.rsvp = form.data.get('rsvp') register.donation = form.data.get('donation') register.put() flash(u'Example %s successfully saved.' % example_id, 'success') return redirect(url_for('register_examples')) return render_template('edit_register.html', register=register, form=form)
def get_record(self, record_id): logger.info('NdbRegisterDao:: DBHIT: get_record for %s ' % record_id) return Register.get_by_id(long(record_id))
def post(self, details_id): message = Register.get_by_id(int(details_id)) message.key.delete() return self.redirect("/messages")
def get(self, details_id): message = Register.get_by_id(int(details_id)) output = {"message": message} return self.render_template("delete.html", output)