Django How to catch ModelForm unique together errors -


i have modelform has unique_together constraint on fields. when pass data form , call form.is_valid(), returns false if record exists , if other error occurs.

so, want in case record exists(unique_together validation fails) , thing in case form.is_vaid() returns false due other reasons. how achieve ?

it have modelform code , traceback errors in both cases give more accurate answer, workaround parse form.errors, corresponding type error or message error , write corresponding code.

ps : message should comment under post lack few reputation points, sorry that.


Comments

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -