title: Join two models in Django filter
body: <p>I might be stupid for not finding the right keywords to look for, but here's the actual problem:<br>
  I'm trying to <em>select</em> database values by joining two different models in <code>Django</code>.<br>
  Consider the following <code>models.py</code>:</p>
  
  <pre><code>class Token(models.Model):
      userid = models.TextField()
      access_token = models.TextField()
      refresh_token = models.TextField(default='None', null=True)
  
  class File(models.Model):
      userid = models.ForeignKey(Token, on_delete=models.CASCADE)
      name = models.TextField()
      link = models.TextField()
      size = models.BigIntegerField()
  </code></pre>
  
  <p>I'd now like to have all files from <code>File</code> with their corresponding <code>access_token</code> and <code>userid</code>.<br>
  I tried to do the following:</p>
  
  <pre><code>data = File.objects.filter(name__startswith='Dummystring')
  </code></pre>
  
  <p>How to obtain the access_token in this scenario?</p>