In View:
context['categories'] = = models.Category.objects.all().get_cached_trees()
In template:
{% load mptt_tags %}
<ul>
{% recursetree categories %}
<li>
{{ node.name }}
{% if not node.is_leaf_node %}
<ul class="children">
{{ children }}
</ul>
{% endif %}
</li>
{% endrecursetree %}
</ul>
As a result, it renders only first level of queryset. If remove get_cached_trees
it renders all tree. How to render all tree with get_cached_trees
?