title: Dynamic URLs for hierarchy tree on Django
body: <p>I would like to build a hierarchy tree of content with no depth limits.</p>
  <p>models.py:</p>
  <pre><code>class Element(models.Model):
    name = models.CharField(verbose_name=&quot;Nombre&quot;, max_length=250)
    parent = models.ForeignKey(&quot;self&quot;, on_delete=models.CASCADE)
    slug = models.TextField(verbose_name=&quot;Slug&quot;, blank=True)
  
    def save(self, *args, **kwargs):
      self.slug = slugify(self.name)
      super(Element, self).save(*args, **kwargs)
  </code></pre>
  <p><code>.../element_n-1/element_n/element_n+1/...</code></p>
  <p>How do I have to write the path in urls.py to get this functionality?</p>