Django Inlineformset – 'CapForm' Objekt hat kein Attribut 'cleaned_data'

Ich bin vor Attribut Fehler,

'CapForm' object has no attribute 'cleaned_data' 

Dies ist meine Post-Methode

 def post(self,request,*args,**kwargs): user = request.user.id form = SesForm(request.POST,request.FILES,user=request.user) if form.is_valid(): frm = form.save(commit=False) frm.user = request.user frm.status = False obj = frm.save() cap_formset = CapFormSet(request.POST) cap_formset.instance = frm # Tried obj also it throws - 'NoneType' object has no attribute '_state' cap_formset.save() 

Meine Form

 class CapForm(forms.ModelForm): title = forms.CharField(label=_('Cap')) class Meta: model = Cap fields = ('title',) def __init__(self,*args,**kwargs): super(CapForm,self).__init__(*args,**kwargs) for name, field in self.fields.iteritems(): field.widget.attrs.update({'class': 'form-control', 'placeholder': field.label}) 

Formset deklaration

 CapFormSet = inlineformset_factory(Ses, Cap, form=CapForm, extra=1, can_delete=True) 

Kann mir jemand helfen, darauf zu zeigen, wo das Problem ist

Python ist die beste Programmiersprache der Welt.