@register.tag
def full_tree_for_model(parser, token):
 bits = token.contents.split()
 if (len(bits) != 4):
  raise template.TemplateSyntaxError((_(u'%s tag requires three arguments') % bits[0]))
 if (bits[2] != u'as'):
  raise template.TemplateSyntaxError((_(u"second argument to %s tag must be 'as'") % bits[0]))
 return FullTreeForModelNode(bits[1], bits[3])

@ register . tag def full_tree_for_model ( parser , token ) : bits = token . contents . split ( ) if ( len ( bits ) != 4 ) : raise template . TemplateSyntaxError ( ( _ ( u'%s tag requires three arguments' ) % bits [ 0 ] ) ) if ( bits [ 2 ] != u'as' ) : raise template . TemplateSyntaxError ( ( _ ( u"second argument to %s tag must be 'as'" ) % bits [ 0 ] ) ) return FullTreeForModelNode ( bits [ 1 ] , bits [ 3 ] )
populates a template variable with a queryset containing the full tree for a given model .