web/contentment/taxonomy.py
def nextAll(self):
		"""All siblings following this asset."""
		from operator import __or__
		from functools import reduce

		query = []

		# Indexing note: (parent, order, id) for covered query and optimal re-use.
		# Including id here to prevent an edge case (assets being shuffled) from including non-siblings.
		for id, parent, order in self.clone().scalar('id', 'parent', 'order'):#.no_dereference():
			query.append(Q(parent=parent, order__gt=order, id__ne=id))

		if not query:
			return None

		return self.base_query(reduce(__or__, query)).order_by('parent', 'order')
All siblings following this asset.
All siblings following this asset.
All siblings following this asset .
def nextAll(self):
		from operator import __or__
		from functools import reduce
		query = []
		for id, parent, order in self.clone().scalar('id', 'parent', 'order'):
			query.append(Q(parent=parent, order__gt=order, id__ne=id))
		if not query:
			return None
		return self.base_query(reduce(__or__, query)).order_by('parent', 'order')
def nextAll ( self ) : from operator import __or__ from functools import reduce query = [ ] for id , parent , order in self . clone ( ) . scalar ( 'id' , 'parent' , 'order' ) : query . append ( Q ( parent = parent , order__gt = order , id__ne = id ) ) if not query : return None return self . base_query ( reduce ( __or__ , query ) ) . order_by ( 'parent' , 'order' )
All siblings following this asset.
All siblings following this asset .
"""All siblings following this asset.""" # Indexing note: (parent, order, id) for covered query and optimal re-use. # Including id here to prevent an edge case (assets being shuffled) from including non-siblings. #.no_dereference():
self