On Sun, 19 May 2013 06:38:50 -0700 (PDT)
Kai Schlamp wrote:
> Hello.
>
> How to raise a `ValidationException` in the models `clean` method?
>
> def clean(self):
> from django.core.exceptions import ValidationError
> raise ValidationError({'title': 'not ok'})
>
> The above d
Hello.
How to raise a `ValidationException` in the models `clean` method?
def clean(self):
from django.core.exceptions import ValidationError
raise ValidationError({'title': 'not ok'})
The above does not add the error to the `title` field (when using a form),
but to the non
2 matches
Mail list logo