def get_children(self):
        """Return all the children of this object."""
        if hasattr(self, '_cached_children'):
            children = self._toplevel().objects.filter(
                pk__in=[n.pk for n in self._cached_children]
            )
            children._result_cache = self._cached_children
            return children
        else:
            return self.get_descendants(include_self=False, depth=1)
def get_children ( self ) : if hasattr ( self , '_cached_children' ) : children = self . _toplevel ( ) . objects . filter ( pk__in = [ n . pk for n in self . _cached_children ] ) children . _result_cache = self . _cached_children return children else : return self . get_descendants ( include_self = False , depth = 1 )
Return all the children of this object.