@register.tag<EOL>def active(parser, token):
args = token.split_contents()<EOL>path = args[<NUM_LIT:1>]<EOL>view = args[<NUM_LIT:2>].replace('<STR_LIT:">', '<STR_LIT>').replace("<STR_LIT:'>", '<STR_LIT>')<EOL>strict = args[<NUM_LIT:3>].replace('<STR_LIT:">', '<STR_LIT>').replace("<STR_LIT:'>", '<STR_LIT>')<EOL>arg1 = None; arg2 = None; arg3 = None<EOL>if len(args) > <NUM_LIT:4>:<EOL><INDENT>arg1 = args[<NUM_LIT:4>]<EOL><DEDENT>if len(args) > <NUM_LIT:5>:<EOL><INDENT>arg2 = args[<NUM_LIT:5>]<EOL><DEDENT>if len(args) > <NUM_LIT:6>:<EOL><INDENT>arg3 = args[<NUM_LIT:6>]<EOL><DEDENT>if not view:<EOL><INDENT>raise template.TemplateSyntaxError("<STR_LIT>" % token.contents.split()[<NUM_LIT:0>])<EOL><DEDENT>return ActiveTag(view, path, strict, arg1, arg2, arg3)<EOL>
tag to determine if a link is to the current page, and if it is, sets 'link_active'
        to True in the context.

        Use:
            {% active path view strict[True,False] arg1 arg2 arg3 %}

            path:   the path to check. Generally this is just 'request.path'
            view:   the view that you want to check against the path. (uses reverse)
            strict: if strict is true, then the two paths need to be exactly the same.
                    if strict is false, then a path of /some/path/ and a view with the url
                    /some/ will match.
            args:   args needed by the given view to get its path using reverse.

        Example:
            {% active request.path "settings" True %}
            <a href="{% url settings %}" class="{% if link_active %} active{% endif %}">