django – AttributeError in / posts / add / The object PostForm & # 39; does not have attribute 'cleaner_data & # 39;

Display the PostForm class on the metodo which is valid for work formulas, but which is not restored or for the one that is cleaned, but which is already updated:

AttributeError to / posts / add /
The object & # 39; PostForm & # 39; does not have attribute 'cleaner_data & # 39;

postform

PostForm class (forms.Form):
image = forms.ImageField (required = False)
content = forms.CharField (widget = forms.Textarea, required = False)

def is_valid (self):
valid = true
image = self.cleaned_data.get ('image')
content = self.cleaned_data.get ('content')

if the picture is None and the content is None:
self.add_error (& # 39; Only texting precisions / or uma imagem & # 39;)
valid = false

valid return

def add_error (self, message):
errors = self._errors.setdefault (forms.forms.NON_FIELD_ERRORS, forms.utils.ErrorList ())
errors.append (message)

View

@Connection required
def add_post (request):
if request.method == & # 39; POST & # 39 ;:
form = PostForm (request.POST, request.FILES)

if form.is_valid ():
data_form = form.cleaned_data
Post.objects.create (image = data_form['image'], content = data_form['content'], user = request.user)

return the redirection (& # 39; index & # 39;)

other:
return the redirection (& # 39; index & # 39;)