Why doesn't Django enforce my unique_together constraint as a form.ValidationError instead of throwing an exception?
问题 Edit: While this post is a duplicate of Django's ModelForm unique_together validation, the accepted answer here of removing the 'exclude' from the ModelForm is a much cleaner solution than the accepted answer in the other question. This is a follow-up to this question. If I don't explicitly check the unique_together constraint in the clean_title() function, django throws an exception: IntegrityError at /journal/journal/4 duplicate key value violates unique constraint "journal_journal_owner_id