Does the concept of severity exist in Django's form validation or is it only errors?
Also, how about suppressing warnings/errors?
Does the concept of severity exist in Django's form validation or is it only errors?
Also, how about suppressing warnings/errors?
Django forms can only raise ValidationErrors (see here). One way to get around this is to use the new messaging system. There are 5 levels of messages defined, with the ability to define additional custom message levels.
As for suppressing errors/warnings, you can always simply ignore form.errors
in your template. Also take a look at the clean
methods in the forms module - you should be able to suppress some warnings there.