title: django foreign key save
body: <p>I have models for eg like this.</p>
  
  <pre><code>class Mp3(models.Model):
      title=models.CharField(max_length=30)
      artist=models.ForeignKey('Artist')
  </code></pre>
  
  <p>and Here is how the Artist models looks like:</p>
  
  <pre><code>class Artist(models.Model):
      name=models.CharField(max_length=100,default="Unknown")
  </code></pre>
  
  <p>I have created Artist with id 1. How I can create a mp3 that is assigned to this artist?(I want need it for query like this for eg.</p>
  
  <pre><code>mp3=Mp3.objects.get(id=50)
  mp3.artist
  </code></pre>
  
  <p>)I have tried sth like this</p>
  
  <pre><code>newMp3=Mp3(title="sth",artist=1)
  </code></pre>
  
  <p>but I got than</p>
  
  <pre><code>ValueError: Cannot assign "1": "Mp3.artist" must be a "Artist" instance.
  </code></pre>
  
  <p>I understand the error but still don't know how to solve this. Thanks for any help
  Best Regards</p>