def handle_token(cls, parser, token):
        """Class method to parse render_comment_list and return a Node."""
        tokens = token.contents.split()
        if tokens[1] != 'for':
            raise template.TemplateSyntaxError("Second argument in %r tag must be 'for'" % tokens[0])

        # {% render_comment_list for obj %}
        if len(tokens) == 3:
            return cls(object_expr=parser.compile_filter(tokens[2]))

        # {% render_comment_list for app.models pk %}
        elif len(tokens) == 4:
            return cls(
                ctype = BaseCommentNode.lookup_content_type(tokens[2], tokens[0]),
                object_pk_expr = parser.compile_filter(tokens[3])
            )
def handle_token ( cls , parser , token ) : tokens = token . contents . split ( ) if tokens [ 1 ] != 'for' : raise template . TemplateSyntaxError ( "Second argument in %r tag must be 'for'" % tokens [ 0 ] ) if len ( tokens ) == 3 : return cls ( object_expr = parser . compile_filter ( tokens [ 2 ] ) ) elif len ( tokens ) == 4 : return cls ( ctype = BaseCommentNode . lookup_content_type ( tokens [ 2 ] , tokens [ 0 ] ) , object_pk_expr = parser . compile_filter ( tokens [ 3 ] ) )
Class method to parse render_comment_list and return a Node.