Django - access m2m objects (or raw pks) from ``clean`` before model is saved -
of course can't use self.related_field.objects.all()
, or you'll ...needs have primary key...
error, if want run custom validation inside of model.clean
, there appears no way access data. of course can use form.clean
this, i'm not using forms.
what asking impossible - m2m records cannot exist until main object has primary key value. there no way access data because not exist.
Comments
Post a Comment