Document full_clean() better (include cases where it isn't used)
|Reported by:||Oroku Saki||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If you read here: http://docs.djangoproject.com/en/dev/ref/models/instances/#id1
It says that full_clean() is called most of the time by ModelForm. When isn't it called, or better why isn't it called in some cases? Also, where is it called, if it's not called during Model.save()? In clicking through to ModelForm docs (recommended in the section linked above) there is no mention of full_clean(). It might be better to explain the relationship to ModelForm in this section and leave the link out. In my case, I added
raise Exception("HELP ME") in a model's clean() method and when saving the model in the admin no exception was raised, which tells me that full_clean() indeed wasn't called. I don't have a suggestion as to how to better document this section because I still haven't solved my problem, but I believe it would really benefit anyone who is using the new model validation.