title: Filtering reverse relationship for a single object in Django
body: <p>Suppose I have the following two models:</p>
  
  <pre><code>class Person(models.Model):
      """
      A person model with the name of the person.
      """
      name = models.CharField()
  
  
  class Vehicle(models.Model):
      """
      A vehicle model with the owner of the vehicle, and the type of the vehicle.
      A vehicle type could be a car, a truck or a bike.
      """
      owner = Models.ForeignKey(Person, related_name='vehicles')
      type = models.CharField()
  </code></pre>
  
  <p>With these two models, Django will automatically create a backwards relation where all vehicles of a person could be accessed by the following query:</p>
  
  <pre><code>    person = Person.objects.get(pk=1)
      person.vehicles.all()
  </code></pre>
  
  <p>This will return all vehicles related to that person, so far so good.</p>
  
  <p>Now suppose that I want to get the person object with the vehicles filtered, say I want only vehicles of a bike type. How could I do that?</p>
  
  <p>To put the question in a context, I'm trying to build the following urls:</p>
  
  <pre><code>    api.example.com/v1/person/1/vehicles/ [returns all vehicles]
      api.example.com/v1/person/1/vehicles/?type=bike [returns only vehicles of type bike]
  </code></pre>
  
  <p>Thank you.</p>