title: How to read the primary key of a ForeignKey without loading the corresponding item?
body: <p>I have 2 Django models :</p>
  
  <pre><code>class A(models.Model):
      uniq_name = models.CharField(max_length=30,primary_key=True)
      info1 = models.CharField(max_length=30)     
      info2 = models.CharField(max_length=30)
  
  class B(models.Model):
      a = models.ForeignKey(A)
      info3 = models.CharField(max_length=30)     
      info4 = models.CharField(max_length=30)
  </code></pre>
  
  <p>If I do :</p>
  
  <pre><code>b = B.objects.get(id = n), it generates one database request.
  </code></pre>
  
  <p>If I do</p>
  
  <pre><code>print b.a.pk : it generate another request.
  </code></pre>
  
  <p>Is that possible to access b.a primary key (I only need this information, not info1 nor info2) without generating another request nor using 'select_related()' ?</p>
  
  <p>I could do a :</p>
  
  <pre><code>print b.__dict__['a_id']
  </code></pre>
  
  <p>It works, but it seems to me very ugly : do you have a nicer way ?</p>