简体   繁体   English

/en/admin/login/ 'staticfiles' 处的 TemplateSyntaxError 不是已注册的标签库。 必须是以下之一:

[英]TemplateSyntaxError at /en/admin/login/ 'staticfiles' is not a registered tag library. Must be one of:

I've installed django-cms.我已经安装了 django-cms。 The first time I type python manage.py runserver , I get the error我第一次输入python manage.py runserver ,我得到了错误

'staticfiles' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_style_tags
admin_tree
admin_tree_list
admin_urls
cache
cms_admin
cms_alias_tags
cms_js_tags
cms_static
cms_tags
djangocms_text_ckeditor_tags
easy_thumbnails_tags
filer_admin_tags
filer_image_tags
filer_tags
i18n
l10n
log
menu_tags
sekizai_tags
snippet_tags
static
thumbnail
tz

All the solutions basically say the same thing: Use {% load static %} instead of {% load staticfiles %}所有的解决方案基本上都说同样的话:使用{% load static %}而不是{% load staticfiles %}

I changed the files where these errors occurred....and it worked.我更改了发生这些错误的文件......并且它起作用了。 I get the django CMS page saying that installation was successful.我得到 django CMS 页面说安装成功。

But now it also says that "the form could not be loaded. Please check that the server is running correctly."但是现在它也说“无法加载表单。请检查服务器是否正常运行。” This message displays after I log in with "admin" as username and password (which somehow was created for me) on the localhost.当我在 localhost 上使用“admin”作为用户名和密码(不知何故为我创建的)登录后,将显示此消息。 And yes, the server is running correctly.是的,服务器运行正常。 No issues没有问题

Could it be that the edits I did changed some of the files?难道是我所做的编辑改变了一些文件? I only changed the static files as I was supposed to in the solutions on this site.我只更改了 static 文件,正如我应该在本网站的解决方案中所做的那样。

That's due to deprecations, as mentioned in Django TemplateSyntaxError - 'staticfiles' is not a registered tag library这是由于弃用,如Django TemplateSyntaxError - 'staticfiles' is not a registered tag library

It's already logged as an issue against django-cms here https://github.com/divio/django-cms/issues/6844它已经被记录为针对 django-cms 的问题https://github.com/divio/django-cms/issues/6844

In the meantime同时

pipenv install 'django<2.1'

(or pip, if that's your pref) will get you going. (或 pip,如果那是您的偏好)会让您继续前进。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 /&#39;staticfiles&#39; 处的 Django TemplateSyntaxError 不是已注册的标记库。 必须是以下之一:admin_list admin_modify admin_urls - Django TemplateSyntaxError at / 'staticfiles' is not a registered tag library. Must be one of: admin_list admin_modify admin_urls /'xxx' 处的 TemplateSyntaxError 不是已注册的标签库。 必须是以下之一: - TemplateSyntaxError at / 'xxx' is not a registered tag library. Must be one of: django.template.exceptions.TemplateSyntaxError:&#39;static&#39;不是已注册的标记库。 必须是以下之一: - django.template.exceptions.TemplateSyntaxError: 'static' is not a registered tag library. Must be one of: “bootstrap4”处的 TemplateSyntaxError 不是已注册的标签库。 必须是以下之一:已安装引导程序并在 INSTALED_APPS 中 - TemplateSyntaxError at 'bootstrap4' is not a registered tag library. Must be one of: bootstrap is installed and in INSTALED_APPS django_rest_swagger - &#39;staticfiles&#39; 不是注册的标签库。 必须是以下之一: - django_rest_swagger - 'staticfiles' is not a registered tag library. Must be one of: Django TemplateSyntaxError - 'staticfiles' 不是注册的标签库 - Django TemplateSyntaxError - 'staticfiles' is not a registered tag library “ abc”不是注册标签库。 必须是以下之一: Django的 - “abc” is not a registered tag library. must be one of: “efg” | django Django 3.0.8 'bootstrap' 不是注册标签库。 必须是以下之一: - Django 3.0.8 ' bootstrap' is not a registered tag library. Must be one of: TemplateSyntaxError &#39;apptags&#39; 不是注册的标签库 - TemplateSyntaxError 'apptags' is not a registered tag library 静态文件不是注册标签,静态文件未加载 - Staticfiles not a registered tag and staticfiles not loading
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM