title: How to show a certain number of levels in django-mptt?
body: <p>In my Django project I use <a href="https://github.com/django-mptt/django-mptt" rel="nofollow noreferrer">django-mptt</a> application to create hierarchical tree. Right now next code works well but I want to show only first  4 level of the tree. How to make it correctly? I am confused.</p>
  
  <p><strong>views.py:</strong></p>
  
  <pre><code>context['caregories'] = Category.objects.get(id=5).get_descendants()
  </code></pre>
  
  <p><strong>html:</strong></p>
  
  <pre><code>{% load mptt_tags %}
  &lt;ul&gt;
      {% recursetree caregories %}
          &lt;li&gt;
              {{ node.name }}
              {% if not node.is_leaf_node %}
                  &lt;ul class="children"&gt;
                      {{ children }}
                  &lt;/ul&gt;
              {% endif %}
          &lt;/li&gt;
      {% endrecursetree %}
  &lt;/ul&gt;
  </code></pre>