def POST(self): f = self.form() # due a bug in webpy we have to do web.input(_unicode=False) # when having a File input element in a form if not f.validates(web.input(_unicode=False)): return view.application_form(f) else: success = handle_post(f) raise web.seeother('/submit_application?success=%s' % success)
def POST(self): f = self.form() # due a bug in webpy we have to do web.input(_unicode=False) # when having a File input element in a form if not f.validates(web.input(_unicode=False)): f.resume.value = '' # avoid utf8 codec error in new webpy version return view.application_form(f) else: success = handle_post(f) raise web.seeother('/submit_application?success=%s' % success)
def GET(self): success = web.input(success='').success return view.application_form(self.form(), success)