title: Upload pic from another website using django
body: <p>I want to make an image uploader using images links on the internet (eq: <code>wwww.google.com/image.jpg</code>). The user writes the previous url and then my model upload it.</p>
  
  <p>This my code:</p>
  
  <p><em>form</em></p>
  
  <pre><code>&lt;input id="id_name" type="text" name="name" maxlength="255" value="www.example.com/main.jpg"  /&gt;
  </code></pre>
  
  <p><em>view.py</em></p>
  
  <pre><code>def Post_date():
      if request.method == 'POST':
          form = Addamazon()
          image_url = request.POST.get('image')
          file = urllib.urlopen(image_url)
          im = cStringIO.StringIO(file.read()) # constructs a StringIO holding the image
          img = Image.open(im)
          save = '/tmp/' + str(int(time.time())) + '.gif'
  
          img.save(save)
          form.image=save
  
  
      if form.is_valid():               
          pic = form.save(commit=False)
          pic.save()
  </code></pre>
  
  <p><em>models.py</em></p>
  
  <pre><code>class Pic(models.Model):
      image = ImageWithThumbsField(upload_to='images', sizes=((128, 128),))
  </code></pre>
  
  <p>The image uploads but <code>if form.is_valid():</code> doesn't work and I don't know how to add it to the form data.
  how i can assign the downloaded image to my form (form.image=save)?</p>