예제 #1
0
    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")
예제 #2
0
파일: views.py 프로젝트: meyilmaz/rsvplus
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)
예제 #3
0
 def get_record(self, record_id):
   logger.info('NdbRegisterDao:: DBHIT: get_record for %s ' % record_id)
   return Register.get_by_id(long(record_id))  
예제 #4
0
    def post(self, details_id):
        message = Register.get_by_id(int(details_id))
        message.key.delete()

        return self.redirect("/messages")
예제 #5
0
 def get(self, details_id):
     message = Register.get_by_id(int(details_id))
     output = {"message": message}
     return self.render_template("delete.html", output)