title: Unable to upload image using shell in django
body: <p>I am newbie on dJango/python. I am trying python shell to save data using model. I have done as:</p>
  
  <p><strong>Model</strong></p>
  
  <pre><code>class Author(models.Model):
  salutation = models.CharField(max_length=10)
  first_name = models.CharField(max_length=30)
  last_name = models.CharField(max_length=40)
  email = models.EmailField()
  headshot = models.ImageField(upload_to='/tmp')
  
  def __str__(self):
      return '%s %s' % (self.first_name, self.last_name)
  </code></pre>
  
  <p>Now I have tried the command in shell:</p>
  
  <pre><code>&gt;&gt;&gt; from books.models import Author
  &gt;&gt;&gt; a = Author(salutation='Mr.',
  ... first_name='First Name',
  ... last_name='Last Name',
  ... email='myemail@myemail.com')   
  </code></pre>
  
  <p>Then I have put an image in the project's tmp directory and run following the command:</p>
  
  <pre><code>a.headshot.save('/abc.jpg', Author(open('/tmp/pic.jpg', 'r')))
  </code></pre>
  
  <p>It gives me error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;console&gt;", line 1, in &lt;module&gt;
  FileNotFoundError: [Errno 2] No such file or directory: '/pyproject/mysite/tmp/pic.jpg'
  </code></pre>
  
  <p>Please help me someone.</p>