ColumnFormFormSet objects has no attribute 'save'

When I try to submit this form, it throws me an error saying ColumnFormFormSet objects has no attribute 'save'

from django import forms
from .models import Column

class ColumnForm(forms.ModelForm):
    class Meta:
        model = Column
        fields = ['name', 'selec_type']

views.py:

From .forms import ColumnForm
From django.forms import formset_factory

def design(request):
    ColumnFormSet = formset_factory(ColumnForm, extra=30)
    formset = ColumnFormSet
    if request.method == 'POST':
        formset = ColumnFormSet(request.POST)
        if formset.is_valid():
            formset.save()
            return redirect('Home')
    else:
        formset = ColumnFormSet()
    return render (request, 'design.html', {'formset':formset})
template.design.html:

<form method='post'>
    {% csrf_token %}
{{ formset.management_form}}
   {% for form in formset %}
        {{Form.as_p}}
   {% endfor %}
<button type='submit'>Save<button/>
<form/>

A Form (as compared to a ModelForm) doesn’t have a save method.

Likewise, a formset (as compared to a Model formset) also doesn’t have a save method.

If you’re looking to save the formset directly, it needs to be a modelformset.

So, the form class should be:

class ColumnForm(forms.ModelFormSet)

So, the form class should be:

class ColumnForm(forms.ModelFormSet)

And delete this:

class ColumnForm(forms.ModelForm)

No, the Form defintion is correct. It’s your formset that isn’t correct. You need to use modelformset_factory instead of formset_factory.