title: django foreignkey accessing through related_name
body: <p>From what i have read and from a few posts on here (and reading their solutions) I thought I had implemented this correct.  It would appear that I have not quite grasped something with foreign keys and related_name.  Here are my models and what I am trying to do in order to access the linked class.</p>
  
  <pre><code>class Menu(models.Model):
      menu_name = models.CharField(max_length=25, verbose_name="Menu Name")
      urlconf_name = models.CharField(max_length=25, verbose_name="URLConf Name")
      menu_position = models.IntegerField(verbose_name="Menu Position", unique=True)
      has_sub_menu = models.BooleanField(default=False, verbose_name="Sub Menu Linked")
      active = models.BooleanField(default=True, verbose_name="Menu Active")
  
      def __str__(self):
          return self.menu_name
  
  class Sub_Menu(models.Model):
      class Meta:
          ordering = ['menu_position']
      sub_name = models.CharField(max_length=25, verbose_name="Sub Menu Name")
      urlconf_name = models.CharField(max_length=25, verbose_name="Sub Menu URLConf Name")
      menu_position = models.IntegerField(verbose_name="Sub Menu Position")
      menu_id = models.ForeignKey(Menu, related_name="submenu")
      active = models.BooleanField(default=True, verbose_name="Menu Active")
  
      def __str__(self):
          return self.sub_name
  </code></pre>
  
  <p>Now I thought I could simply access the linked data using something.submenu (i.e. the related_name) but it doesnt seem to work.  With the above code, I've tried;</p>
  
  <pre><code>the_menu = Menu.objects.filter(urlconf_name=split_path[0])
  built_breadcrumb.append([the_menu[0].menu_name, split_path[0]])
  if the_menu[0].has_sub_menu:
      built_breadcrumb.append([the_menu[0].submenu.sub_name, the_menu[0].submenu.urlconf_name])
  </code></pre>
  
  <p>That doesnt work.  I've just realised that it will return a list of items but I'm still struggling to work out how to access them.  I've also tried;</p>
  
  <pre><code>the_menu[0].submenu.filter(urlconf_name='home/contactus')
  </code></pre>
  
  <p>This also errors.</p>
  
  <p>I'm racking my brain so I someone could explain how to access through the related_name I'd really appreciate it.  I've done this (through help with someone on here) but it doesn't seem to work in this context for some reason.</p>
  
  <p>Thanks very much in advance.</p>
  
  <p>Wayne</p>