Update dependencies
Commit ec5d7 pushed by Anže Pečar

12 tests 4 passed 8 failed Duration
self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
parse_until = ('elif', 'else', 'endif')

    def parse(self, parse_until=None):
        """
        Iterate through the parser tokens and compiles each one into a node.
    
        If parse_until is provided, parsing will stop once one of the
        specified tokens has been reached. This is formatted as a list of
        tokens, e.g. ['elif', 'else', 'endif']. If no matching token is
        reached, raise an exception with the unclosed block tag details.
        """
        if parse_until is None:
            parse_until = []
        nodelist = NodeList()
        while self.tokens:
            token = self.next_token()
            # Use the raw values here for TokenType.* for a tiny performance boost.
            token_type = token.token_type.value
            if token_type == 0:  # TokenType.TEXT
                self.extend_nodelist(nodelist, TextNode(token.contents), token)
            elif token_type == 1:  # TokenType.VAR
                if not token.contents:
                    raise self.error(
                        token, "Empty variable tag on line %d" % token.lineno
                    )
                try:
                    filter_expression = self.compile_filter(token.contents)
                except TemplateSyntaxError as e:
                    raise self.error(token, e)
                var_node = VariableNode(filter_expression)
                self.extend_nodelist(nodelist, var_node, token)
            elif token_type == 2:  # TokenType.BLOCK
                try:
                    command = token.contents.split()[0]
                except IndexError:
                    raise self.error(token, "Empty block tag on line %d" % token.lineno)
                if command in parse_until:
                    # A matching token has been reached. Return control to
                    # the caller. Put the token back on the token list so the
                    # caller knows where it terminated.
                    self.prepend_token(token)
                    return nodelist
                # Add the token to the command stack. This is used for error
                # messages if further parsing fails due to an unclosed block
                # tag.
                self.command_stack.append((command, token))
                # Get the tag callback function from the ones registered with
                # the parser.
                try:
>                   compile_func = self.tags[command]
E                   KeyError: 'query_string'

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:510: KeyError

During handling of the above exception, another exception occurred:

self = <accounts.tests.TestSelectedInstance testMethod=test_invalid_selected_instance>

    def test_invalid_selected_instance(self):
>       response = self.client.get("/?selected_instance=invalid")

accounts/tests.py:159: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1129: in get
    response = super().get(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:479: in get
    return self.generic(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:676: in generic
    return self.request(**r)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1092: in request
    self.check_exception(response)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:805: in check_exception
    raise exc_value
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
accounts/views.py:144: in index
    return render(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/shortcuts.py:25: in render
    content = loader.render_to_string(template_name, context, request, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:61: in render_to_string
    template = get_template(template_name, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:15: in get_template
    return engine.get_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/backends/django.py:79: in get_template
    return Template(self.engine.get_template(template_name), self)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:177: in get_template
    template, origin = self.find_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:159: in find_template
    template = loader.get_template(name, skip=skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/template_partials/loader.py:41: in get_template
    template = self.loaders[0].get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/cached.py:57: in get_template
    template = super().get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/base.py:28: in get_template
    return Template(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:154: in __init__
    self.nodelist = self.compile_nodelist()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:196: in compile_nodelist
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:295: in do_extends
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:234: in do_block
    nodelist = parser.parse(("endblock",))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/defaulttags.py:962: in do_if
    nodelist = parser.parse(("elif", "else", "endif"))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:512: in parse
    self.invalid_block_tag(token, command, parse_until)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
token = <Block token: "query_string...">, command = 'query_string'
parse_until = ('elif', 'else', 'endif')

    def invalid_block_tag(self, token, command, parse_until=None):
        if parse_until:
>           raise self.error(
                token,
                "Invalid block tag on line %d: '%s', expected %s. Did you "
                "forget to register or load this tag?"
                % (
                    token.lineno,
                    command,
                    get_text_list(["'%s'" % p for p in parse_until], "or"),
                ),
            )
E           django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 11: 'query_string', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:563: TemplateSyntaxError
Stdout
Done 🎉
self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
parse_until = ('elif', 'else', 'endif')

    def parse(self, parse_until=None):
        """
        Iterate through the parser tokens and compiles each one into a node.
    
        If parse_until is provided, parsing will stop once one of the
        specified tokens has been reached. This is formatted as a list of
        tokens, e.g. ['elif', 'else', 'endif']. If no matching token is
        reached, raise an exception with the unclosed block tag details.
        """
        if parse_until is None:
            parse_until = []
        nodelist = NodeList()
        while self.tokens:
            token = self.next_token()
            # Use the raw values here for TokenType.* for a tiny performance boost.
            token_type = token.token_type.value
            if token_type == 0:  # TokenType.TEXT
                self.extend_nodelist(nodelist, TextNode(token.contents), token)
            elif token_type == 1:  # TokenType.VAR
                if not token.contents:
                    raise self.error(
                        token, "Empty variable tag on line %d" % token.lineno
                    )
                try:
                    filter_expression = self.compile_filter(token.contents)
                except TemplateSyntaxError as e:
                    raise self.error(token, e)
                var_node = VariableNode(filter_expression)
                self.extend_nodelist(nodelist, var_node, token)
            elif token_type == 2:  # TokenType.BLOCK
                try:
                    command = token.contents.split()[0]
                except IndexError:
                    raise self.error(token, "Empty block tag on line %d" % token.lineno)
                if command in parse_until:
                    # A matching token has been reached. Return control to
                    # the caller. Put the token back on the token list so the
                    # caller knows where it terminated.
                    self.prepend_token(token)
                    return nodelist
                # Add the token to the command stack. This is used for error
                # messages if further parsing fails due to an unclosed block
                # tag.
                self.command_stack.append((command, token))
                # Get the tag callback function from the ones registered with
                # the parser.
                try:
>                   compile_func = self.tags[command]
E                   KeyError: 'query_string'

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:510: KeyError

During handling of the above exception, another exception occurred:

self = <accounts.tests.TestSelectedInstance testMethod=test_no_selected_instance>

    def test_no_selected_instance(self):
>       response = self.client.get("/")

accounts/tests.py:69: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1129: in get
    response = super().get(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:479: in get
    return self.generic(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:676: in generic
    return self.request(**r)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1092: in request
    self.check_exception(response)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:805: in check_exception
    raise exc_value
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
accounts/views.py:144: in index
    return render(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/shortcuts.py:25: in render
    content = loader.render_to_string(template_name, context, request, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:61: in render_to_string
    template = get_template(template_name, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:15: in get_template
    return engine.get_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/backends/django.py:79: in get_template
    return Template(self.engine.get_template(template_name), self)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:177: in get_template
    template, origin = self.find_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:159: in find_template
    template = loader.get_template(name, skip=skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/template_partials/loader.py:41: in get_template
    template = self.loaders[0].get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/cached.py:57: in get_template
    template = super().get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/base.py:28: in get_template
    return Template(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:154: in __init__
    self.nodelist = self.compile_nodelist()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:196: in compile_nodelist
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:295: in do_extends
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:234: in do_block
    nodelist = parser.parse(("endblock",))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/defaulttags.py:962: in do_if
    nodelist = parser.parse(("elif", "else", "endif"))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:512: in parse
    self.invalid_block_tag(token, command, parse_until)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
token = <Block token: "query_string...">, command = 'query_string'
parse_until = ('elif', 'else', 'endif')

    def invalid_block_tag(self, token, command, parse_until=None):
        if parse_until:
>           raise self.error(
                token,
                "Invalid block tag on line %d: '%s', expected %s. Did you "
                "forget to register or load this tag?"
                % (
                    token.lineno,
                    command,
                    get_text_list(["'%s'" % p for p in parse_until], "or"),
                ),
            )
E           django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 11: 'query_string', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:563: TemplateSyntaxError
self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
parse_until = ('elif', 'else', 'endif')

    def parse(self, parse_until=None):
        """
        Iterate through the parser tokens and compiles each one into a node.
    
        If parse_until is provided, parsing will stop once one of the
        specified tokens has been reached. This is formatted as a list of
        tokens, e.g. ['elif', 'else', 'endif']. If no matching token is
        reached, raise an exception with the unclosed block tag details.
        """
        if parse_until is None:
            parse_until = []
        nodelist = NodeList()
        while self.tokens:
            token = self.next_token()
            # Use the raw values here for TokenType.* for a tiny performance boost.
            token_type = token.token_type.value
            if token_type == 0:  # TokenType.TEXT
                self.extend_nodelist(nodelist, TextNode(token.contents), token)
            elif token_type == 1:  # TokenType.VAR
                if not token.contents:
                    raise self.error(
                        token, "Empty variable tag on line %d" % token.lineno
                    )
                try:
                    filter_expression = self.compile_filter(token.contents)
                except TemplateSyntaxError as e:
                    raise self.error(token, e)
                var_node = VariableNode(filter_expression)
                self.extend_nodelist(nodelist, var_node, token)
            elif token_type == 2:  # TokenType.BLOCK
                try:
                    command = token.contents.split()[0]
                except IndexError:
                    raise self.error(token, "Empty block tag on line %d" % token.lineno)
                if command in parse_until:
                    # A matching token has been reached. Return control to
                    # the caller. Put the token back on the token list so the
                    # caller knows where it terminated.
                    self.prepend_token(token)
                    return nodelist
                # Add the token to the command stack. This is used for error
                # messages if further parsing fails due to an unclosed block
                # tag.
                self.command_stack.append((command, token))
                # Get the tag callback function from the ones registered with
                # the parser.
                try:
>                   compile_func = self.tags[command]
E                   KeyError: 'query_string'

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:510: KeyError

During handling of the above exception, another exception occurred:

self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance>

    def test_selected_instance(self):
>       response = self.client.get("/?selected_instance=mastodon.social")

accounts/tests.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1129: in get
    response = super().get(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:479: in get
    return self.generic(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:676: in generic
    return self.request(**r)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1092: in request
    self.check_exception(response)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:805: in check_exception
    raise exc_value
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
accounts/views.py:144: in index
    return render(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/shortcuts.py:25: in render
    content = loader.render_to_string(template_name, context, request, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:61: in render_to_string
    template = get_template(template_name, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:15: in get_template
    return engine.get_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/backends/django.py:79: in get_template
    return Template(self.engine.get_template(template_name), self)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:177: in get_template
    template, origin = self.find_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:159: in find_template
    template = loader.get_template(name, skip=skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/template_partials/loader.py:41: in get_template
    template = self.loaders[0].get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/cached.py:57: in get_template
    template = super().get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/base.py:28: in get_template
    return Template(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:154: in __init__
    self.nodelist = self.compile_nodelist()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:196: in compile_nodelist
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:295: in do_extends
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:234: in do_block
    nodelist = parser.parse(("endblock",))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/defaulttags.py:962: in do_if
    nodelist = parser.parse(("elif", "else", "endif"))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:512: in parse
    self.invalid_block_tag(token, command, parse_until)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
token = <Block token: "query_string...">, command = 'query_string'
parse_until = ('elif', 'else', 'endif')

    def invalid_block_tag(self, token, command, parse_until=None):
        if parse_until:
>           raise self.error(
                token,
                "Invalid block tag on line %d: '%s', expected %s. Did you "
                "forget to register or load this tag?"
                % (
                    token.lineno,
                    command,
                    get_text_list(["'%s'" % p for p in parse_until], "or"),
                ),
            )
E           django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 11: 'query_string', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:563: TemplateSyntaxError
self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
parse_until = ('elif', 'else', 'endif')

    def parse(self, parse_until=None):
        """
        Iterate through the parser tokens and compiles each one into a node.
    
        If parse_until is provided, parsing will stop once one of the
        specified tokens has been reached. This is formatted as a list of
        tokens, e.g. ['elif', 'else', 'endif']. If no matching token is
        reached, raise an exception with the unclosed block tag details.
        """
        if parse_until is None:
            parse_until = []
        nodelist = NodeList()
        while self.tokens:
            token = self.next_token()
            # Use the raw values here for TokenType.* for a tiny performance boost.
            token_type = token.token_type.value
            if token_type == 0:  # TokenType.TEXT
                self.extend_nodelist(nodelist, TextNode(token.contents), token)
            elif token_type == 1:  # TokenType.VAR
                if not token.contents:
                    raise self.error(
                        token, "Empty variable tag on line %d" % token.lineno
                    )
                try:
                    filter_expression = self.compile_filter(token.contents)
                except TemplateSyntaxError as e:
                    raise self.error(token, e)
                var_node = VariableNode(filter_expression)
                self.extend_nodelist(nodelist, var_node, token)
            elif token_type == 2:  # TokenType.BLOCK
                try:
                    command = token.contents.split()[0]
                except IndexError:
                    raise self.error(token, "Empty block tag on line %d" % token.lineno)
                if command in parse_until:
                    # A matching token has been reached. Return control to
                    # the caller. Put the token back on the token list so the
                    # caller knows where it terminated.
                    self.prepend_token(token)
                    return nodelist
                # Add the token to the command stack. This is used for error
                # messages if further parsing fails due to an unclosed block
                # tag.
                self.command_stack.append((command, token))
                # Get the tag callback function from the ones registered with
                # the parser.
                try:
>                   compile_func = self.tags[command]
E                   KeyError: 'query_string'

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:510: KeyError

During handling of the above exception, another exception occurred:

self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance_https_truncate>

    def test_selected_instance_https_truncate(self):
>       response = self.client.get("/?selected_instance=https://mastodon.social")

accounts/tests.py:114: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1129: in get
    response = super().get(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:479: in get
    return self.generic(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:676: in generic
    return self.request(**r)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1092: in request
    self.check_exception(response)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:805: in check_exception
    raise exc_value
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
accounts/views.py:144: in index
    return render(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/shortcuts.py:25: in render
    content = loader.render_to_string(template_name, context, request, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:61: in render_to_string
    template = get_template(template_name, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:15: in get_template
    return engine.get_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/backends/django.py:79: in get_template
    return Template(self.engine.get_template(template_name), self)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:177: in get_template
    template, origin = self.find_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:159: in find_template
    template = loader.get_template(name, skip=skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/template_partials/loader.py:41: in get_template
    template = self.loaders[0].get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/cached.py:57: in get_template
    template = super().get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/base.py:28: in get_template
    return Template(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:154: in __init__
    self.nodelist = self.compile_nodelist()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:196: in compile_nodelist
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:295: in do_extends
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:234: in do_block
    nodelist = parser.parse(("endblock",))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/defaulttags.py:962: in do_if
    nodelist = parser.parse(("elif", "else", "endif"))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:512: in parse
    self.invalid_block_tag(token, command, parse_until)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
token = <Block token: "query_string...">, command = 'query_string'
parse_until = ('elif', 'else', 'endif')

    def invalid_block_tag(self, token, command, parse_until=None):
        if parse_until:
>           raise self.error(
                token,
                "Invalid block tag on line %d: '%s', expected %s. Did you "
                "forget to register or load this tag?"
                % (
                    token.lineno,
                    command,
                    get_text_list(["'%s'" % p for p in parse_until], "or"),
                ),
            )
E           django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 11: 'query_string', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:563: TemplateSyntaxError
self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
parse_until = ('elif', 'else', 'endif')

    def parse(self, parse_until=None):
        """
        Iterate through the parser tokens and compiles each one into a node.
    
        If parse_until is provided, parsing will stop once one of the
        specified tokens has been reached. This is formatted as a list of
        tokens, e.g. ['elif', 'else', 'endif']. If no matching token is
        reached, raise an exception with the unclosed block tag details.
        """
        if parse_until is None:
            parse_until = []
        nodelist = NodeList()
        while self.tokens:
            token = self.next_token()
            # Use the raw values here for TokenType.* for a tiny performance boost.
            token_type = token.token_type.value
            if token_type == 0:  # TokenType.TEXT
                self.extend_nodelist(nodelist, TextNode(token.contents), token)
            elif token_type == 1:  # TokenType.VAR
                if not token.contents:
                    raise self.error(
                        token, "Empty variable tag on line %d" % token.lineno
                    )
                try:
                    filter_expression = self.compile_filter(token.contents)
                except TemplateSyntaxError as e:
                    raise self.error(token, e)
                var_node = VariableNode(filter_expression)
                self.extend_nodelist(nodelist, var_node, token)
            elif token_type == 2:  # TokenType.BLOCK
                try:
                    command = token.contents.split()[0]
                except IndexError:
                    raise self.error(token, "Empty block tag on line %d" % token.lineno)
                if command in parse_until:
                    # A matching token has been reached. Return control to
                    # the caller. Put the token back on the token list so the
                    # caller knows where it terminated.
                    self.prepend_token(token)
                    return nodelist
                # Add the token to the command stack. This is used for error
                # messages if further parsing fails due to an unclosed block
                # tag.
                self.command_stack.append((command, token))
                # Get the tag callback function from the ones registered with
                # the parser.
                try:
>                   compile_func = self.tags[command]
E                   KeyError: 'query_string'

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:510: KeyError

During handling of the above exception, another exception occurred:

self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance_http_truncate>

    def test_selected_instance_http_truncate(self):
>       response = self.client.get("/?selected_instance=https://mastodon.social")

accounts/tests.py:129: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1129: in get
    response = super().get(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:479: in get
    return self.generic(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:676: in generic
    return self.request(**r)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1092: in request
    self.check_exception(response)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:805: in check_exception
    raise exc_value
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
accounts/views.py:144: in index
    return render(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/shortcuts.py:25: in render
    content = loader.render_to_string(template_name, context, request, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:61: in render_to_string
    template = get_template(template_name, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:15: in get_template
    return engine.get_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/backends/django.py:79: in get_template
    return Template(self.engine.get_template(template_name), self)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:177: in get_template
    template, origin = self.find_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:159: in find_template
    template = loader.get_template(name, skip=skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/template_partials/loader.py:41: in get_template
    template = self.loaders[0].get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/cached.py:57: in get_template
    template = super().get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/base.py:28: in get_template
    return Template(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:154: in __init__
    self.nodelist = self.compile_nodelist()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:196: in compile_nodelist
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:295: in do_extends
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:234: in do_block
    nodelist = parser.parse(("endblock",))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/defaulttags.py:962: in do_if
    nodelist = parser.parse(("elif", "else", "endif"))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:512: in parse
    self.invalid_block_tag(token, command, parse_until)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
token = <Block token: "query_string...">, command = 'query_string'
parse_until = ('elif', 'else', 'endif')

    def invalid_block_tag(self, token, command, parse_until=None):
        if parse_until:
>           raise self.error(
                token,
                "Invalid block tag on line %d: '%s', expected %s. Did you "
                "forget to register or load this tag?"
                % (
                    token.lineno,
                    command,
                    get_text_list(["'%s'" % p for p in parse_until], "or"),
                ),
            )
E           django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 11: 'query_string', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:563: TemplateSyntaxError
self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
parse_until = ('elif', 'else', 'endif')

    def parse(self, parse_until=None):
        """
        Iterate through the parser tokens and compiles each one into a node.
    
        If parse_until is provided, parsing will stop once one of the
        specified tokens has been reached. This is formatted as a list of
        tokens, e.g. ['elif', 'else', 'endif']. If no matching token is
        reached, raise an exception with the unclosed block tag details.
        """
        if parse_until is None:
            parse_until = []
        nodelist = NodeList()
        while self.tokens:
            token = self.next_token()
            # Use the raw values here for TokenType.* for a tiny performance boost.
            token_type = token.token_type.value
            if token_type == 0:  # TokenType.TEXT
                self.extend_nodelist(nodelist, TextNode(token.contents), token)
            elif token_type == 1:  # TokenType.VAR
                if not token.contents:
                    raise self.error(
                        token, "Empty variable tag on line %d" % token.lineno
                    )
                try:
                    filter_expression = self.compile_filter(token.contents)
                except TemplateSyntaxError as e:
                    raise self.error(token, e)
                var_node = VariableNode(filter_expression)
                self.extend_nodelist(nodelist, var_node, token)
            elif token_type == 2:  # TokenType.BLOCK
                try:
                    command = token.contents.split()[0]
                except IndexError:
                    raise self.error(token, "Empty block tag on line %d" % token.lineno)
                if command in parse_until:
                    # A matching token has been reached. Return control to
                    # the caller. Put the token back on the token list so the
                    # caller knows where it terminated.
                    self.prepend_token(token)
                    return nodelist
                # Add the token to the command stack. This is used for error
                # messages if further parsing fails due to an unclosed block
                # tag.
                self.command_stack.append((command, token))
                # Get the tag callback function from the ones registered with
                # the parser.
                try:
>                   compile_func = self.tags[command]
E                   KeyError: 'query_string'

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:510: KeyError

During handling of the above exception, another exception occurred:

self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance_slash_truncate>

    def test_selected_instance_slash_truncate(self):
>       response = self.client.get("/?selected_instance=https://mastodon.social/")

accounts/tests.py:144: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1129: in get
    response = super().get(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:479: in get
    return self.generic(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:676: in generic
    return self.request(**r)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1092: in request
    self.check_exception(response)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:805: in check_exception
    raise exc_value
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
accounts/views.py:144: in index
    return render(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/shortcuts.py:25: in render
    content = loader.render_to_string(template_name, context, request, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:61: in render_to_string
    template = get_template(template_name, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:15: in get_template
    return engine.get_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/backends/django.py:79: in get_template
    return Template(self.engine.get_template(template_name), self)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:177: in get_template
    template, origin = self.find_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:159: in find_template
    template = loader.get_template(name, skip=skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/template_partials/loader.py:41: in get_template
    template = self.loaders[0].get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/cached.py:57: in get_template
    template = super().get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/base.py:28: in get_template
    return Template(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:154: in __init__
    self.nodelist = self.compile_nodelist()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:196: in compile_nodelist
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:295: in do_extends
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:234: in do_block
    nodelist = parser.parse(("endblock",))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/defaulttags.py:962: in do_if
    nodelist = parser.parse(("elif", "else", "endif"))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:512: in parse
    self.invalid_block_tag(token, command, parse_until)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
token = <Block token: "query_string...">, command = 'query_string'
parse_until = ('elif', 'else', 'endif')

    def invalid_block_tag(self, token, command, parse_until=None):
        if parse_until:
>           raise self.error(
                token,
                "Invalid block tag on line %d: '%s', expected %s. Did you "
                "forget to register or load this tag?"
                % (
                    token.lineno,
                    command,
                    get_text_list(["'%s'" % p for p in parse_until], "or"),
                ),
            )
E           django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 11: 'query_string', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:563: TemplateSyntaxError
self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
parse_until = ('elif', 'else', 'endif')

    def parse(self, parse_until=None):
        """
        Iterate through the parser tokens and compiles each one into a node.
    
        If parse_until is provided, parsing will stop once one of the
        specified tokens has been reached. This is formatted as a list of
        tokens, e.g. ['elif', 'else', 'endif']. If no matching token is
        reached, raise an exception with the unclosed block tag details.
        """
        if parse_until is None:
            parse_until = []
        nodelist = NodeList()
        while self.tokens:
            token = self.next_token()
            # Use the raw values here for TokenType.* for a tiny performance boost.
            token_type = token.token_type.value
            if token_type == 0:  # TokenType.TEXT
                self.extend_nodelist(nodelist, TextNode(token.contents), token)
            elif token_type == 1:  # TokenType.VAR
                if not token.contents:
                    raise self.error(
                        token, "Empty variable tag on line %d" % token.lineno
                    )
                try:
                    filter_expression = self.compile_filter(token.contents)
                except TemplateSyntaxError as e:
                    raise self.error(token, e)
                var_node = VariableNode(filter_expression)
                self.extend_nodelist(nodelist, var_node, token)
            elif token_type == 2:  # TokenType.BLOCK
                try:
                    command = token.contents.split()[0]
                except IndexError:
                    raise self.error(token, "Empty block tag on line %d" % token.lineno)
                if command in parse_until:
                    # A matching token has been reached. Return control to
                    # the caller. Put the token back on the token list so the
                    # caller knows where it terminated.
                    self.prepend_token(token)
                    return nodelist
                # Add the token to the command stack. This is used for error
                # messages if further parsing fails due to an unclosed block
                # tag.
                self.command_stack.append((command, token))
                # Get the tag callback function from the ones registered with
                # the parser.
                try:
>                   compile_func = self.tags[command]
E                   KeyError: 'query_string'

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:510: KeyError

During handling of the above exception, another exception occurred:

self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance_through_session>

    def test_selected_instance_through_session(self):
>       self.client.get("/?selected_instance=mastodon.social")

accounts/tests.py:173: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1129: in get
    response = super().get(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:479: in get
    return self.generic(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:676: in generic
    return self.request(**r)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1092: in request
    self.check_exception(response)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:805: in check_exception
    raise exc_value
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
accounts/views.py:144: in index
    return render(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/shortcuts.py:25: in render
    content = loader.render_to_string(template_name, context, request, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:61: in render_to_string
    template = get_template(template_name, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:15: in get_template
    return engine.get_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/backends/django.py:79: in get_template
    return Template(self.engine.get_template(template_name), self)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:177: in get_template
    template, origin = self.find_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:159: in find_template
    template = loader.get_template(name, skip=skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/template_partials/loader.py:41: in get_template
    template = self.loaders[0].get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/cached.py:57: in get_template
    template = super().get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/base.py:28: in get_template
    return Template(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:154: in __init__
    self.nodelist = self.compile_nodelist()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:196: in compile_nodelist
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:295: in do_extends
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:234: in do_block
    nodelist = parser.parse(("endblock",))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/defaulttags.py:962: in do_if
    nodelist = parser.parse(("elif", "else", "endif"))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:512: in parse
    self.invalid_block_tag(token, command, parse_until)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
token = <Block token: "query_string...">, command = 'query_string'
parse_until = ('elif', 'else', 'endif')

    def invalid_block_tag(self, token, command, parse_until=None):
        if parse_until:
>           raise self.error(
                token,
                "Invalid block tag on line %d: '%s', expected %s. Did you "
                "forget to register or load this tag?"
                % (
                    token.lineno,
                    command,
                    get_text_list(["'%s'" % p for p in parse_until], "or"),
                ),
            )
E           django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 11: 'query_string', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:563: TemplateSyntaxError
self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
parse_until = ('elif', 'else', 'endif')

    def parse(self, parse_until=None):
        """
        Iterate through the parser tokens and compiles each one into a node.
    
        If parse_until is provided, parsing will stop once one of the
        specified tokens has been reached. This is formatted as a list of
        tokens, e.g. ['elif', 'else', 'endif']. If no matching token is
        reached, raise an exception with the unclosed block tag details.
        """
        if parse_until is None:
            parse_until = []
        nodelist = NodeList()
        while self.tokens:
            token = self.next_token()
            # Use the raw values here for TokenType.* for a tiny performance boost.
            token_type = token.token_type.value
            if token_type == 0:  # TokenType.TEXT
                self.extend_nodelist(nodelist, TextNode(token.contents), token)
            elif token_type == 1:  # TokenType.VAR
                if not token.contents:
                    raise self.error(
                        token, "Empty variable tag on line %d" % token.lineno
                    )
                try:
                    filter_expression = self.compile_filter(token.contents)
                except TemplateSyntaxError as e:
                    raise self.error(token, e)
                var_node = VariableNode(filter_expression)
                self.extend_nodelist(nodelist, var_node, token)
            elif token_type == 2:  # TokenType.BLOCK
                try:
                    command = token.contents.split()[0]
                except IndexError:
                    raise self.error(token, "Empty block tag on line %d" % token.lineno)
                if command in parse_until:
                    # A matching token has been reached. Return control to
                    # the caller. Put the token back on the token list so the
                    # caller knows where it terminated.
                    self.prepend_token(token)
                    return nodelist
                # Add the token to the command stack. This is used for error
                # messages if further parsing fails due to an unclosed block
                # tag.
                self.command_stack.append((command, token))
                # Get the tag callback function from the ones registered with
                # the parser.
                try:
>                   compile_func = self.tags[command]
E                   KeyError: 'query_string'

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:510: KeyError

During handling of the above exception, another exception occurred:

self = <accounts.tests.TestSelectedInstance testMethod=test_unselected_instance>

    def test_unselected_instance(self):
>       self.client.get("/?selected_instance=mastodon.social")

accounts/tests.py:98: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1129: in get
    response = super().get(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:479: in get
    return self.generic(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:676: in generic
    return self.request(**r)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1092: in request
    self.check_exception(response)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:805: in check_exception
    raise exc_value
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
accounts/views.py:144: in index
    return render(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/shortcuts.py:25: in render
    content = loader.render_to_string(template_name, context, request, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:61: in render_to_string
    template = get_template(template_name, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:15: in get_template
    return engine.get_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/backends/django.py:79: in get_template
    return Template(self.engine.get_template(template_name), self)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:177: in get_template
    template, origin = self.find_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:159: in find_template
    template = loader.get_template(name, skip=skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/template_partials/loader.py:41: in get_template
    template = self.loaders[0].get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/cached.py:57: in get_template
    template = super().get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/base.py:28: in get_template
    return Template(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:154: in __init__
    self.nodelist = self.compile_nodelist()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:196: in compile_nodelist
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:295: in do_extends
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:234: in do_block
    nodelist = parser.parse(("endblock",))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/defaulttags.py:962: in do_if
    nodelist = parser.parse(("elif", "else", "endif"))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:512: in parse
    self.invalid_block_tag(token, command, parse_until)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
token = <Block token: "query_string...">, command = 'query_string'
parse_until = ('elif', 'else', 'endif')

    def invalid_block_tag(self, token, command, parse_until=None):
        if parse_until:
>           raise self.error(
                token,
                "Invalid block tag on line %d: '%s', expected %s. Did you "
                "forget to register or load this tag?"
                % (
                    token.lineno,
                    command,
                    get_text_list(["'%s'" % p for p in parse_until], "or"),
                ),
            )
E           django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 11: 'query_string', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:563: TemplateSyntaxError