@register.tag
def get_fragment(parser, token):
 fragments = token.contents.split()
 if (len(fragments) == 3):
  return GetFragmentNode(fragments[1], fragments[2])
 elif ((len(fragments) == 5) and (fragments[3] == u'as')):
  return GetFragmentNode(fragments[1], fragments[2], fragments[4])
 raise template.TemplateSyntaxError((u'Invalid syntax for get_fragment: %s' % token.contents))

@ register . tag def get_fragment ( parser , token ) : fragments = token . contents . split ( ) if ( len ( fragments ) == 3 ) : return GetFragmentNode ( fragments [ 1 ] , fragments [ 2 ] ) elif ( ( len ( fragments ) == 5 ) and ( fragments [ 3 ] == u'as' ) ) : return GetFragmentNode ( fragments [ 1 ] , fragments [ 2 ] , fragments [ 4 ] ) raise template . TemplateSyntaxError ( ( u'Invalid syntax for get_fragment: %s' % token . contents ) )
fetches the content of a fragment .