title: Django - Form template throws "This field is required" for Imagefield
body: <p>I'm having some trouble with image upload in Django 3.0. I'm experiencing the issue where trying to upload an image from my template throws the error "This field is required" even though i have a file selected. It uploads fine I do it from the form in the admin area.</p>
  
  <p>models.py</p>
  
  <pre class="lang-py prettyprint-override"><code>class Image(models.Model):
      title = models.CharField(max_length=50)
      image = models.ImageField(upload_to='images/')
  
      def __str__(self):
          return self.title
  </code></pre>
  
  <p>views.py</p>
  
  <pre class="lang-py prettyprint-override"><code>def new_post_view(request):
      new_img = ImageForm(request.POST or None)
  
      if new_img.is_valid():
          new_img.save()
          new_img = ImageForm()
          return redirect('imageposts:gallery')
      return render(request, 'imageposts/create.html', {'new_pic': new_img})
  </code></pre>
  
  <p>forms.py</p>
  
  <pre class="lang-py prettyprint-override"><code>class ImageForm(forms.ModelForm):
      class Meta:
          model = Image
          fields = [
              "title",
              "image",
          ]
  
          widgets = {
              "title": forms.TextInput(),
              "image": forms.FileInput(),
          }
  </code></pre>
  
  <p>create.html</p>
  
  <pre class="lang-html prettyprint-override"><code>{% extends 'base.html' %}
  
  {% block content %}
    &lt;form method="post" enctype="multipart/form-data"&gt;
      {% csrf_token %}
      {{new_pic.as_p}}
      &lt;button type="submit"&gt;Add image&lt;/button&gt;
    &lt;/form&gt;
  {% endblock %}
  </code></pre>
  
  <p>Solutions i've seen have been to make the field nullable and empty, but for this case, the image is an always required, but it's just not uploading the selected file. The form just clears the file section and throws "This field is required." I've tried in both django 3.0 and django 2.2 and I get the same result. I can't tell what it is I'm doing wrong here, and would appreciate any help with this.</p>