Why would I ever use save(commit=False)
instead of just creating a form object from the ModelForm
subclass and running is_valid()
to validate both the form and model?
In other words, what is save(commit=False)
for?
If you don't mind, could you guys provide hypothetical situations where this might be useful?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…