def show_form_errors(request, form):
 for error in form.non_field_errors():
  messages.error(request, error)
 for field in form:
  for error in field.errors:
   messages.error(request, (_('Error in parameter %(field)s: %(error)s') % {'field': field.name, 'error': error}))

def show_form_errors ( request , form ) : for error in form . non_field_errors ( ) : messages . error ( request , error ) for field in form : for error in field . errors : messages . error ( request , ( _ ( 'Error in parameter %(field)s: %(error)s' ) % { 'field' : field . name , 'error' : error } ) )
shows all form errors as a message .