May 2018
Beginner to intermediate
452 pages
11h 26m
English
The final step in preventing errors from getting into our CSV file is to stop the application from saving if the form has known errors. Let's perform the following steps to do this:
def get_errors(self): """Get a list of field errors in the form""" errors = {} for key, widget in self.inputs.items(): if hasattr(widget.input, 'trigger_focusout_validation'): widget.input.trigger_focusout_validation() if widget.error.get(): errors[key] = widget.error.get() return errors ...