如何解决Wagtailtrans 设置失败
拜托,有什么帮助吗? 我正在尝试为我的项目设置 wagtailtrans。 按照这个https://wagtailtrans.readthedocs.io/en/2.1/getting_started.html 添加中间类后,应用程序不起作用
'wagtail.core.middleware.SiteMiddleware','wagtailtrans.middleware.TranslationMiddleware',
输出日志:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/core/servers/basehttp.py",line 45,in get_internal_wsgi_application
return import_string(app_path)
File "/usr/local/lib/python3.8/site-packages/django/utils/module_loading.py",line 17,in import_string
module = import_module(module_path)
File "/usr/local/lib/python3.8/importlib/__init__.py",line 127,in import_module
return _bootstrap._gcd_import(name[level:],package,level)
File "<frozen importlib._bootstrap>",line 1014,in _gcd_import
File "<frozen importlib._bootstrap>",line 991,in _find_and_load
File "<frozen importlib._bootstrap>",line 975,in _find_and_load_unlocked
File "<frozen importlib._bootstrap>",line 671,in _load_unlocked
File "<frozen importlib._bootstrap_external>",line 783,in exec_module
File "<frozen importlib._bootstrap>",line 219,in _call_with_frames_removed
File "/bpvApp/bpvApp/wsgi.py",line 16,in <module>
application = get_wsgi_application()
File "/usr/local/lib/python3.8/site-packages/django/core/wsgi.py",line 13,in get_wsgi_application
return WSGIHandler()
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/wsgi.py",in __init__
self.load_middleware()
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",line 40,in load_middleware
middleware = import_string(middleware_path)
File "/usr/local/lib/python3.8/site-packages/django/utils/module_loading.py",line 961,in _call_with_frames_removed
File "<frozen importlib._bootstrap>",line 973,in _find_and_load_unlocked
ModuleNotFoundError: No module named 'wagtail.wagtailcore'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py",line 932,in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py",line 870,in run
self._target(*self._args,**self._kwargs)
File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py",line 53,in wrapper
fn(*args,**kwargs)
File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/runserver.py",line 138,in inner_run
handler = self.get_handler(*args,**options)
File "/usr/local/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/runserver.py",line 27,in get_handler
handler = super().get_handler(*args,**options)
File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/runserver.py",line 65,in get_handler
return get_internal_wsgi_application()
File "/usr/local/lib/python3.8/site-packages/django/core/servers/basehttp.py",line 47,in get_internal_wsgi_application
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: WSGI application 'bpvApp.wsgi.application' could not be loaded; Error importing module.
请问,我该如何解决?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。