0
我有一個Django的形式,其爲的ModelForm:的Django的ModelForm FORMSET第一種形式需要
class EducationForm(ModelForm):
class Meta:
model = Education
但它實際上是作爲一個formset:
queryset_education = Education.objects.filter(member = edit_member)
EducationFormSet = modelformset_factory(Education, form = EducationForm)
form_education = EducationFormSet(queryset = queryset_education)
我怎樣才能迫使第一形式需要? 我在StackOverflow中看到了一些類似的問題...沒有人幫助我,因爲我沒有從BaseFormSet繼承的類(我應該創建一個嗎?)
謝謝!
Tidhar
這正是我現在正在嘗試... – TidharPeer