def get_queryset(self):
    path = self.kwargs.get('path', '')
    folders = path.split('/')
    for folder in folders:
        try:
            if (not self.parent):
                if folder:
                    self.parent = Folder.objects.get(name=folder)
            else:
                self.parent = self.parent.get_children().get(name=folder)
        except Folder.DoesNotExist:
            raise Http404(_('Folder does not exist'))
    return self.model.objects.filter(folder=self.parent)
def get_queryset(self):
    path = self.kwargs.get('path', )
    folders = path.split('/')
    for folder in folders:
        try:
            if (not self.parent):
                if folder:
                    self.parent = Folder.objects.get(name=folder)
            else:
                self.parent = self.parent.get_children().get(name=folder)
        except Folder.DoesNotExist:
            raise Http404(_('Folder does not exist'))
    return self.model.objects.filter(folder=self.parent)