web/application.py
changeset 4224 5998df006968
parent 3408 c92170fca813
child 4252 6c4f109c2b03
equal deleted inserted replaced
4223:4fb00ccad3df 4224:5998df006968
   373         return result
   373         return result
   374 
   374 
   375     def validation_error_handler(self, req, ex):
   375     def validation_error_handler(self, req, ex):
   376         ex.errors = dict((k, v) for k, v in ex.errors.items())
   376         ex.errors = dict((k, v) for k, v in ex.errors.items())
   377         if '__errorurl' in req.form:
   377         if '__errorurl' in req.form:
   378             forminfo = {'errors': ex,
   378             forminfo = {'error': ex,
   379                         'values': req.form,
   379                         'values': req.form,
   380                         'eidmap': req.data.get('eidmap', {})
   380                         'eidmap': req.data.get('eidmap', {})
   381                         }
   381                         }
   382             req.set_session_data(req.form['__errorurl'], forminfo)
   382             req.set_session_data(req.form['__errorurl'], forminfo)
   383             raise Redirect(req.form['__errorurl'])
   383             raise Redirect(req.form['__errorurl'])