I am trying to save a formset in django. To do so I have my model and a customized form. Then I create my formset this way :
QuoteFormSet = formset_factory(QuoteForm, extra=2)
formset = QuoteFormset(request.POST)
But when I do formset.save() i get AttributeError: 'QuoteFormFormSet' object has no attribute 'save'
my model :
class Quote(models.Model):
country = models.CharField(max_length=2,)
street = models.CharField(max_length=100,)
My form:
class QuoteForm(forms.ModelForm):
class Meta:
model = Quote
country = forms.ChoiceField(choices=COUNTRIES, required=False)
street = forms.CharField(max_length=100, required=False)