It would be nice that we could instead do something like this:
{{{
def save():
self.full_clean(skip_checks_done_in_database=True)
super().save()
}}}
This way we would have the additional safety of checking choices and other
things that aren't checked in the database, but we wouldn't have overhead
of checking a lot of constraints that are already checked in the database.
--
Ticket URL: <https://code.djangoproject.com/ticket/28111>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Tim Graham):
I'm not sure how feasible this would be to implement. It seems like that
flag would have to be passed all the way to `Field.clean()` and to the
field's validators. It's difficult to know which validators are duplicated
and which aren't, especially as behavior might vary across databases. Were
you thinking of offering a patch?
--
Ticket URL: <https://code.djangoproject.com/ticket/28111#comment:1>
* status: new => closed
* resolution: => needsinfo
--
Ticket URL: <https://code.djangoproject.com/ticket/28111#comment:2>