@parse_data
@set_database
def get_leafed_topics(kinds=None, db=None, **kwargs):
 if (not kinds):
  kinds = ['Video', 'Audio', 'Exercise', 'Document']
 Parent = Item.alias()
 parent_values = Item.select(Parent).join(Parent, on=(Item.parent == Parent.pk)).where(Item.kind.in_(kinds)).distinct()
 return parent_values

@ parse_data @ set_database def get_leafed_topics ( kinds = None , db = None , ** kwargs ) : if ( not kinds ) : kinds = [ 'Video' , 'Audio' , 'Exercise' , 'Document' ] Parent = Item . alias ( ) parent_values = Item . select ( Parent ) . join ( Parent , on = ( Item . parent == Parent . pk ) ) . where ( Item . kind . in_ ( kinds ) ) . distinct ( ) return parent_values
convenience function for returning a set of topic nodes that contain content .