Opened 10 years ago
Last modified 9 years ago
#23672 closed New feature
Add “instances” argument to BaseModelFomSet.__init__() — at Version 2
Reported by: | aki33524 | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.7 |
Severity: | Normal | Keywords: | BaseModelFormset |
Cc: | tzanke@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
There are two reasons.
First, as you know, ModelForm can accept instance as keyword arguments.
I think that BaseModelFormSet should follow this. Current BaseModelFormSet support save(commit=False), which returns “instances”. But now, we cannot use it without INSERT in DataBase..
Second, Current BaseModelFormSet accepts “queryset” as keyword argument.
“queryset” can convert to “instances”, but “instances” cannot convert to “queryset”. I think that BaseModelFormSet should accept not “queryset” but “instances”.
For downward compatible, it would be difficult that “instances” replace with “queryset”. So I suggest adding “instances” argument to BaseModelFormSet init.
Change History (2)
comment:1 by , 10 years ago
Summary: | Add “instances” argument to BaseModelFomset.__init__() → Add “instances” argument to BaseModelFomSet.__init__() |
---|
comment:2 by , 10 years ago
Description: | modified (diff) |
---|