title: Django forms: "This field is required" when file POSTed to file field
body: <p>I for some reason am unable to get a file to into my filefield in my ModelForm. The file is submitted and the file name is in the corresponding POST request, however the <code>form.is_valid()</code> fails as it states <code>{'the_file': [u'This field is required.']}</code></p>
  
  <p>I have written a ModelForm for a model with a file field in and a foreign key to another model, thus:</p>
  
  <pre><code>class AccountFile(models.Model):
  the_file = models.FileField(upload_to='{}/%Y/%m/%d/'.format(
      settings.MEDIA_ROOT,
  ))
  account = models.ForeignKey(
      Account,
      blank=True,
      null=True,
      related_name='account_files'
  </code></pre>
  
  <p>I've then generated a form to upload a file, thus:</p>
  
  <pre><code>class UploadFileForm(forms.ModelForm):
  class Meta:
      model = models.AccountFile
      fields = ['the_file' ]
  
  
  def clean_file(self):
      file = self.cleaned_data.get("the_file", False)
      filetype = magic.from_buffer(file.read())
      if not "pdf" in filetype:
          raise forms.ValidationError("File is not pdf.")
      return file
  </code></pre>
  
  <p>Putting in some very basic validation (which will be extended!) when I can get at least one thing to work.</p>
  
  <p>The form is processed like this:</p>
  
  <pre><code>if request.method == 'POST':
      form = forms.UploadFileForm(request.POST, request.FILES)
      if form.is_valid():
          handle_uploaded_file(request.FILES['file'])
          return redirect(
              'account_url',
              acc_manager_pk=acc_manager.pk,
              account_pk=account.pk,
              )
  else:
      form = forms.UploadFileForm()
  </code></pre>
  
  <p>This is on Django 1.7</p>