I'm using Django MPTT to handle my hierarchical Data in my Django application. I'd like to render a TreeView using the recursetree
tag. However, with this code :
{% recursetree system_list %}
<li>{{ node.title }}
{% if not node.is_leaf_node %}
<ul>
{{ children.title }}
</ul>
{% endif %}
</li>
{% endrecursetree %}
I get such a markup :
<li>Uppeur kar parK
<ul>
<Li>Caillou
<Ul>
&Lt;Li&Gt;Patate
&Lt;/Li&Gt;
&Lt;Li&Gt;Courgette
&Lt;/Li&Gt;
&Lt;Li&Gt;Artichaud
&Lt;/Li&Gt;
&Lt;Li&Gt;Brocoli
&Lt;/Li&Gt;
</Ul>
</Li>
<Li>Pierre
</Li>
</ul>
</li>
Do you know why the markup is escaped after the second level ? How could I fix that ?
Try {{ children }}
instead of {{ children.title }}
.