title: How can i query multiple objects, filtering with multiple id's
body: <pre><code>class Timeline(models.Model):
  license = models.ForeignKey(License, on_delete=models.CASCADE)
  last_renewed = models.DateField()
  due_date = models.DateField()
  
  
  def home(request):
  title = &quot;Licences&quot;
  agencies = Agency.objects.all()
  agent =Agency.objects.get(pk=1)
  licenses = License.objects.all()
  for license in licenses:
      print(license.id)
      timeline = Timeline.objects.select_related().filter(license_id = license.id).order_by('-id')[:1]
  </code></pre>
  <p>I want to display at least one timeline related to each of the licenses that i am querying</p>