/usr/lib/python2.7/dist-packages/mptt/querysets.py is in python-django-mptt 0.8.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | from django.db import models
from mptt import utils
class TreeQuerySet(models.query.QuerySet):
def get_descendants(self, *args, **kwargs):
"""
Alias to `mptt.managers.TreeManager.get_queryset_descendants`.
"""
return self.model._tree_manager.get_queryset_descendants(self, *args, **kwargs)
get_descendants.queryset_only = True
def get_ancestors(self, *args, **kwargs):
"""
Alias to `mptt.managers.TreeManager.get_queryset_ancestors`.
"""
return self.model._tree_manager.get_queryset_ancestors(self, *args, **kwargs)
get_ancestors.queryset_only = True
def get_cached_trees(self):
"""
Alias to `mptt.utils.get_cached_trees`.
"""
return utils.get_cached_trees(self)
|