Hi all,

I proposed this in a comment on #16423 <https://code.djangoproject.com/
ticket/16423#comment:3>, and then found that it had come up before:

https://code.djangoproject.com/ticket/13100
https://code.djangoproject.com/ticket/13121

and was rejected thus:

<jkocherhans> I think model-validation is just not what you want it to
be. It's a step on the way there, but we can't start completely
validating models before we save them without an extended deprecation
plan for the current non-validating behavior. All of the authors and
people familiar with the implementation are busy until after 1.2 is
out, but we should have a conversation on django-dev a week or so
after that happens.

<russellm> I'm going to side with Joseph on this one -- he and Honza
spent a long time developing model validation, and I have a lot of
confidence in his design decisions... if you disagree with a decision
we have made, start a thread on django-developers.

I read this, not as a design decision to never do this, but not to do
it before 1.2 was out. It's now well and truly out :)

The only difference, as far as I can see, between
ModelForm._post_clean and Model.full_clean is that validating
uniqueness is optional in the former. It only happens if:

        # It is False by default so overriding self.clean() and
failing to call
        # super will stop validate_unique from being called.

Is this the right thing to do? The comment doesn't justify the
behaviour, it just describes it, and the logic isn't apparent to me.

ModelForm._post_clean would be much simpler if it just called
Model.full_clean. Yes the documentation would have to be changed again
<https://code.djangoproject.com/ticket/13100#comment:2>.

I hope you will consider this change.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to