title: how to pass an object by url to serializer
body: <p>I want to create an API that takes care of a site to list movies and make ratings of each movie. Kind of like a movie review.</p>
  <p>The problem I have is how to make the qualification, how could it be?</p>
  <p>I leave you the models that I have!</p>
  <pre><code>class Movie(models.Model):
  &quot;&quot;&quot;Movie model.&quot;&quot;&quot;
  
  title = models.CharField(max_length=250)
  image = models.ImageField(
      default='movies/images/default.jpg',
      upload_to='movies/images/',
  )
  description = models.TextField(blank=True, null=True)
  duration = models.TimeField()
  director = models.CharField(max_length=100)
  
  rating = models.FloatField(null=True)
  
  created = models.DateTimeField(auto_now_add=True)
  modified = models.DateTimeField(auto_now=True)
  
  def __str__(self):
      &quot;&quot;&quot;Return title.&quot;&quot;&quot;
      return self.title
  
  
  class Rating(models.Model):
  &quot;&quot;&quot;Movie rating model.&quot;&quot;&quot;
  
  movie = models.ForeignKey(
      Movie,
      on_delete=models.CASCADE,
      related_name='rated_movie'
  )
  
  rating_user = models.ForeignKey(
      User,
      null=True,
      on_delete=models.SET_NULL,
      related_name='rating_user',
  )
  
  comments = models.TextField(blank=True)
  
  rating = models.IntegerField(default=5)
  
  def __str__(self):
      &quot;&quot;&quot;Return summary.&quot;&quot;&quot;
      return f'@{self.rating_user.username} rated {self.rating}: {self.movie}'
  </code></pre>
  <p>The idea is that it is accessed through the url, e.g. api/v1/rate/1/ and the rating can be done with a comment and the score that is given.</p>