title: Django - I'm getting "This field is required" error on UPDATING an object
body: <p>When I try to use a form to <strong>edit</strong> an object that includes an image upload I get &quot;This field is required&quot;. A similar form works fine to create the object, but when I retrieve the object and attempt to modify other fields, it fails on the image.</p>
  <pre><code>#-------models.py:
  class Star(models.Model):
      firstname = models.CharField(max_length=32)
      lastname = models.CharField(max_length=32, blank=True)
      portrait = models.ImageField(upload_to='images/')
  
  #------views.py:
  class StarForm(forms.ModelForm):
      class Meta:
          model = Star
          fields = [&quot;firstname&quot;, &quot;lastname&quot;, &quot;portrait&quot;]
  
  def staredit(request, star_id):
      instance = Star.objects.get(pk=star_id)
      form = StarForm(request.POST or None, instance=instance)
      context = {
          &quot;form&quot;: form,
      }
      return render(request, &quot;stars/edit.html&quot;, context)
  
  
  def starchange(request):
      form = StarForm(request.POST, request.FILES)
      if form.is_valid():
          newstar.save()
          context = {
              &quot;message&quot;: &quot;The form was posted&quot;,
          }
          return render(request, &quot;stars/edit.html&quot;, context)
      else:
          context = {
              &quot;message&quot;: form.errors,
          }
          return render(request, &quot;stars/edit.html&quot;, context)
  
  #-----edit.html
  &lt;form action=&quot;/starchange&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
      {% csrf_token %}
      {{ form.as_p }}
      &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;
  &lt;/form&gt;
  {{message}}
  </code></pre>
  <p>Error message:</p>
  <blockquote>
  <p>portrait
  This field is required.</p>
  </blockquote>