@register.filter
def tree_path(items, separator=u' :: '):
 return separator.join((force_text(i) for i in items))

@ register . filter def tree_path ( items , separator = u' :: ' ) : return separator . join ( ( force_text ( i ) for i in items ) )
creates a tree path represented by a list of items by joining the items with a separator .