title: Why my django form cleaned data returns None everytime?
body: <p>I am using the self-referential Foreign Key in my models. In the views when I used the <code>form.cleaned_data.get('parent')</code> it returns <code>None</code> but when I used <code>request.POST.get('parent')</code> it returns the value. Why the <code>cleaned_data</code> is not working here?</p>
  
  <p>models</p>
  
  <pre><code>class Category(models.Model):
      parent = models.ForeignKey('self', blank=True, null=True, on_delete=models.SET_NULL)
      slug = models.SlugField(unique=True, max_length=50)
      title = models.CharField(max_length=255, unique=True)
      created = models.DateTimeField(auto_now_add=True)
      updated = models.DateTimeField(auto_now=True)
  </code></pre>
  
  <p>forms</p>
  
  <pre><code>class CreateCategoryForm(forms.ModelForm):
      class Meta:
          model = Category
          fields = ['title', 'slug']
  </code></pre>
  
  <p>views</p>
  
  <pre><code>def create_category(request):
      form = CreateCategoryForm()
      categories = Category.objects.order_by('-created')
      if request.method == 'POST':
          form = CreateCategoryForm(request.POST)
          if form.is_valid():
              # parent = request.POST.get('parent') # works
              # parent = form.cleaned_data.get('parent') # returns None
              category = form.save(commit=False)
              category.parent = form.cleaned_data.get('parent')
              category.save()
              messages.success(request, 'Created Successfully.')
              return redirect('list_categories')
      return render(request, 'add_category.html', {'form':form, 'categories':categories})
  </code></pre>
  
  <p>template</p>
  
  <pre><code>       &lt;form action="" method="post"&gt;
                {% csrf_token %}
  
              &lt;div class="form-group"&gt;
                &lt;label&gt;Category Name&lt;/label&gt;
                &lt;input type="text" name="title" class="form-control"
                value="{{form.title.value|default_if_none:''}}"/&gt;
                  {% if form.title.errors %}
                   &lt;span class="error"&gt;{{form.title.errors|striptags}}&lt;/span&gt;
                  {% endif %}
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
              &lt;label for="select" class=""&gt;Category Parent&lt;/label&gt;
                  &lt;select name="parent" id="exampleSelect"
                class="form-control"&gt;
                   &lt;option selected&gt;Select&lt;/option&gt;
                  {% for category in categories %}
                &lt;option value="{{category.pk}}"&gt;{{category.title}}&lt;/option&gt;
                  {% endfor %}
              &lt;/select&gt;
              &lt;/div&gt;
  </code></pre>