title: Resubmitting Image in ImageField after Validation Error in Django
body: <p>I have, in my admin interface, a form with a ImageField. Everything works great except when some other field raises a validation error. In those cases, the form returns to the user for correction, but the already loaded image file is cleared from the form.</p>
  
  <p>Any idea in how to, somehow, reload the already submitted image to the form in order to allow the image beeing saved?</p>
  
  <p>Thanks!</p>
  
  <p>SOme interesting bits of code:</p>
  
  <pre><code>class DealForm(forms.ModelForm):
      image = forms.ImageField(required=False,widget=AdminImageWidget)
  
      def clean():
          data = self.cleaned_data
          date_start = data.get('date_start')
          date_end = data.get('date_end')
          (... several other validations ...)
          return data
  </code></pre>
  
  <p>.   </p>
  
  <pre><code>class AdminImageWidget(forms.FileInput):
      def __init__(self, attrs={}):
          super(AdminImageWidget, self).__init__(attrs)
  
      def render(self, name, value, attrs=None):
          output = []
          if value and hasattr(value, "url"):
              output.append(('&lt;a target="_blank" href="%s"&gt;' 
                              '&lt;img src="%s" /&gt;&lt;/a&gt; '
                              % (value.url, value.url_200x150)))
          output.append(super(AdminImageWidget, self).render(name, value, attrs))
          return mark_safe(u''.join(output))
  </code></pre>