tag_parser/basetags.py
def parse(cls, parser, token):
        """
        Parse the tag, instantiate the class.

        :type parser: django.template.base.Parser
        :type token: django.template.base.Token
        """
        tag_name, args, kwargs = parse_token_kwargs(
            parser, token,
            allowed_kwargs=cls.allowed_kwargs,
            compile_args=cls.compile_args,
            compile_kwargs=cls.compile_kwargs
        )
        cls.validate_args(tag_name, *args, **kwargs)
        if cls.end_tag_name:
            kwargs['nodelist'] = parser.parse((cls.end_tag_name,))
            parser.delete_first_token()

        return cls(tag_name, *args, **kwargs)
def parse(cls, parser, token):
        tag_name, args, kwargs = parse_token_kwargs(
            parser, token,
            allowed_kwargs=cls.allowed_kwargs,
            compile_args=cls.compile_args,
            compile_kwargs=cls.compile_kwargs
        )
        cls.validate_args(tag_name, *args, **kwargs)
        if cls.end_tag_name:
            kwargs['nodelist'] = parser.parse((cls.end_tag_name,))
            parser.delete_first_token()

        return cls(tag_name, *args, **kwargs)
def parse ( cls , parser , token ) : tag_name , args , kwargs = parse_token_kwargs ( parser , token , allowed_kwargs = cls . allowed_kwargs , compile_args = cls . compile_args , compile_kwargs = cls . compile_kwargs ) cls . validate_args ( tag_name , * args , * * kwargs ) if cls . end_tag_name : kwargs [ 'nodelist' ] = parser . parse ( ( cls . end_tag_name , ) ) parser . delete_first_token ( ) return cls ( tag_name , * args , * * kwargs )
Parse the tag, instantiate the class.

        :type parser: django.template.base.Parser
        :type token: django.template.base.Token
Parse the tag instantiate the class .