登录页面出错 屏蔽'simpleui', 就没有问题

作者:用户_SSaUAEoK 67 浏览 2 评论 发布时间:2021-05-28 11:08:42

TemplateSyntaxError at /admin/login/ Invalid block tag on line 98: 'translate', expected 'elif','else' or 'endif'. Did you forget to register or load this tag? Request Method: GET Request URL: http://39.100.8.239:8020/admin/login/?next=/ Django Version: 2.1.8 Exception Type: TemplateSyntaxError Exception Value:
Invalid block tag on line 98: 'translate', expected 'elif','else' or 'endif'. Did you forget to register or load this tag? Exception Location: /usr/local/lib/python3.6/site-packages/django/template/base.py in invalid_block_tag, line 528 Python Executable: /usr/bin/python Python Version: 3.6.8 Python Path:
['/home/vsftpd/bigshow', '/usr/lib64/python36.zip', '/usr/lib64/python3.6', '/usr/lib64/python3.6/lib-dynload', '/usr/local/lib64/python3.6/site-packages', '/usr/local/lib/python3.6/site-packages', '/usr/lib64/python3.6/site-packages', '/usr/lib/python3.6/site-packages']

交互提示 Server time: 星期五, 28 五月 2021 11:00:24 +0800 Error during template rendering In template /usr/local/lib/python3.6/site-packages/simpleui/templates/admin/login.html, error at line 98

Invalid block tag on line 98: 'translate', expected 'elif','else' or 'endif'. Did you forget to register or load this tag?

Internal Server Error: /admin/login/ Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 470, in parse compile_func = self.tags[command] KeyError: 'translate'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 156, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 154, in _get_response response = response.render() File "/usr/local/lib/python3.6/site-packages/django/template/response.py", line 106, in render self.content = self.rendered_content File "/usr/local/lib/python3.6/site-packages/django/template/response.py", line 81, in rendered_content template = self.resolve_template(self.template_name) File "/usr/local/lib/python3.6/site-packages/django/template/response.py", line 63, in resolve_template return select_template(template, using=self.using) File "/usr/local/lib/python3.6/site-packages/django/template/loader.py", line 42, in select_template return engine.get_template(template_name) File "/usr/local/lib/python3.6/site-packages/django/template/backends/django.py", line 34, in get_template return Template(self.engine.get_template(template_name), self) File "/usr/local/lib/python3.6/site-packages/django/template/engine.py", line 144, in get_template template, origin = self.find_template(template_name) File "/usr/local/lib/python3.6/site-packages/django/template/engine.py", line 126, in find_template template = loader.get_template(name, skip=skip) File "/usr/local/lib/python3.6/site-packages/django/template/loaders/base.py", line 30, in get_template contents, origin, origin.template_name, self.engine, File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 156, in init self.nodelist = self.compile_nodelist() File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 194, in compile_nodelist return parser.parse() File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 478, in parse raise self.error(token, e) File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 476, in parse compiled_result = compile_func(self, token) File "/usr/local/lib/python3.6/site-packages/django/template/loader_tags.py", line 209, in do_block nodelist = parser.parse(('endblock',)) File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 478, in parse raise self.error(token, e) File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 476, in parse compiled_result = compile_func(self, token) File "/usr/local/lib/python3.6/site-packages/django/template/loader_tags.py", line 209, in do_block nodelist = parser.parse(('endblock',)) File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 478, in parse raise self.error(token, e) File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 476, in parse compiled_result = compile_func(self, token) File "/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py", line 951, in do_if nodelist = parser.parse(('elif', 'else', 'endif')) File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 472, in parse self.invalid_block_tag(token, command, parse_until) File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 528, in invalid_block_tag get_text_list(["'%s'" % p for p in parse_until], 'or'), django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 98: 'translate', expected 'elif','else' or 'endif'. Did you forget to register or load this tag?

Loading...
评论列表 1条评论
社区小助手
2021-06-01 13:49:49

卸载django重装

18668196965
2021-06-03 23:06:33

重装django没用啊,问题依旧