Get related objects attributes
<p>Im trying to make somekind of menu builder, where one model can be selfassigned with <code>ForeignKey</code>.</p>

<pre><code>    class MainMenuItem(models.Model):
        class Meta:
            db_table = "menu_item"
            verbose_name = 'Раздел'
            verbose_name_plural = 'Разделы'     
        title = models.CharField(max_length = 50)
        parentFolder = models.ForeignKey('self', unique=False, related_name="childrenFolders", blank = True, null = True)

        def __unicode__(self):
            return self.title

        def __str__(self):
            return self.title
</code></pre>

<p>And now I'm stacked with a really simple thing...) But anyway... I can't get items, wich assigned to the another item. I wrote that in my template:</p>

<pre><code>    {% for item in menuItems %}

        &lt;li&gt;{{item.childrenFolders.all}}&lt;/li&gt;

    {% endfor %}
</code></pre>

<p>and got an array <code>[&lt;MainMenuItem: item1&gt;, &lt;MainMenuItem: item2&gt;, &lt;MainMenuItem: item3&gt;]</code></p>

<p>But what I need to write after <code>childrenFolders.all...</code> to get a <code>title</code> field? Cause when i write something like <code>childrenFolders.all.item.title</code>, I got nothing...</p>