@register.tag
def get_legalpages(parser, token):
 bits = token.split_contents()
 syntax_message = ('%(tag_name)s expects a syntax of %(tag_name)s as context_name' % dict(tag_name=bits[0]))
 if (len(bits) == 3):
  if (bits[1] != 'as'):
   raise template.TemplateSyntaxError(syntax_message)
  context_name = bits[2]
  return LegalPageNode(context_name)
 else:
  raise template.TemplateSyntaxError(syntax_message)

@ register . tag def get_legalpages ( parser , token ) : bits = token . split_contents ( ) syntax_message = ( '%(tag_name)s expects a syntax of %(tag_name)s as context_name' % dict ( tag_name = bits [ 0 ] ) ) if ( len ( bits ) == 3 ) : if ( bits [ 1 ] != 'as' ) : raise template . TemplateSyntaxError ( syntax_message ) context_name = bits [ 2 ] return LegalPageNode ( context_name ) else : raise template . TemplateSyntaxError ( syntax_message )
retrieves all active legalpage objects .