title: Django recursive model
body: <p>I'm making my own "cloud server" with django, for my projects and files.
  I'm trying to create tree file structure, but I cant figure out the way to do it.<br>
  And how I can make username based URL, like (username/root/home/Documents/...)<br>I'm also interested of some good links and examples of authentication and django style cloud server solutions.<br><br>
  <strong>models.py</strong></p>
  
  <pre><code>class BasicFile(models.Model):
      file_name = models.CharField(max_length=80)
      last_edit = models.DateTimeField(default=datetime.now, blank=True)
      sub_folders = models.IntegerField()
      sub_files = models.IntegerField()
  
      def __str__(self):
          return self.file_name
  </code></pre>
  
  <p><br><strong>views.py</strong></p>
  
  <pre><code>class IndexView(LoginRequiredMixin, ListView):
      template_name = 'cloud/index.html'
      context_object_name = 'project_file'
  
      def get_queryset(self, *args, **kwargs):
          return ProjectFile.objects.all()
  </code></pre>
  
  <p><br><br><strong>urls.py</strong><br></p>
  
  <pre><code>re_path(r'^(?P&lt;username&gt;)/$', views.IndexView.as_view(), name='index'),
  re_path(r'^(?P&lt;username&gt;/f1/f1_child)/$', views.IndexView.as_view(), name='index'),
  </code></pre>