Django: Model Form “object has no attribute 'cleaned_data'”

后端 未结 3 885
星月不相逢
星月不相逢 2020-12-22 17:51

I am trying to make a search form for one of my classes. The model of the form is:

from django import forms
from django.forms import CharField, ModelMultiple         


        
3条回答
  •  囚心锁ツ
    2020-12-22 18:24

    At times, if we forget the

    return self.cleaned_data 
    

    in the clean function of django forms, we will not have any data though the form.is_valid() will return True.

提交回复
热议问题