title: Django, how to access models inside a model through a model field
body: <p>I have two models that have a many-to-one relationship between them.</p>
  
  <pre><code>from django.db import models
  
  
  class Continent(models.Model):
      name = models.CharField(max_length=255, unique=True)
      code = models.CharField(max_length=2, unique=True, primary_key=False)
      c = Continent.objects.get(id=1)
      countries = c.country_set.all()
      class Meta:
          ordering = ["name"]
  
  
  class Country(models.Model):
      name = models.CharField(max_length=255, unique=True)
      capital = models.CharField(max_length=255)
      code = models.CharField(max_length=2, unique=True, primary_key=False)
      continent = models.ForeignKey('Continent')
      population = models.PositiveIntegerField()
      area = PositiveIntegerField()
      class Meta:
          ordering = ["name"]
  </code></pre>
  
  <p>I want the countries of a continent to be accessible through a countries attribute within the Continent model. I tried to follow the relationship "backward" like in the documentation (link below), but can't get it to work. 
  <a href="https://docs.djangoproject.com/en/1.11/topics/db/queries/#backwards-related-objects" rel="nofollow noreferrer">https://docs.djangoproject.com/en/1.11/topics/db/queries/#backwards-related-objects</a></p>