Login

Snippets by whiskybar

Snippet List

unique validation for ModelForm

Inherit your forms from model from this ModelForm and it will check all the database fields with unique=True in `is_valid()`. This is a hack around [#5736](http://code.djangoproject.com/ticket/5736). It is actually a part of a grand problem mentioned in [#4895](http://code.djangoproject.com/ticket/4895). You can use this hack until the issue is fully resolved.

  • newforms
Read More

whiskybar has posted 1 snippet.