title: Open a remote file via urlopen and add it to a FileField
body: <p>I have a question similar to this:
  <a href="https://stackoverflow.com/questions/811167/how-to-manually-assign-imagefield-in-django">how to manually assign imagefield in Django</a></p>
  
  <p>Except my file is coming from a remote host and I am only given an url, so something like:</p>
  
  <pre><code>class Book(models.Model):
      name = models.CharField()
      url = models.URLField()
      file = models.FileField(null=True, blank=True, editable=False)
  
  class BookForm(forms.ModelForm):
      class Meta:
          model = Book
  
  def view(request):
      if request.POST:
          form = BookForm()
          if form.is_valid():
              request = form.instance.source_url
              try:
                  f = urlopen(request)
                  # ...create open file obj...
                  form.instance.local_file.save(form.instance.ref, f.read(), True)
  
              except Exception:
                  print 3
  </code></pre>
  
  <p>How should I turn <code>f</code> into an open file object in this case so I can save its contents?</p>