i have subclassed baseinlineformset. i've overridden save() method, , inside it, first call super save method instances, like:
def save(self, convenient_attribute=none, commit=true, *args, **kwargs): instances = super(custombasemodelformset, self).save(commit=false) instance in instances: # each instance if commit: instance.save() return instances
from view:
formset.save(convenient_attribute=some_object)
if check forms in formset var,it bound , valid. seems fine, the formset instances don't saved in db!
i've found when call superclass save(), var instances empty list. there's no instances commit. why don't them?
Comments
Post a Comment