ModuleNotFoundError.在django中没有名为'ckeditor_uploader'的模块。在django中没有名为 "ckeditor_uploader "的模块。

问题描述 投票:0回答:1

我想在我的django博客应用中集成一个ckeditor。我严格按照django-ckeditor的github页面上的说明进行安装,添加到已安装的应用中,添加到urls中,收集staticfiles,在settings.py中配置设置,并在必要时在models中导入ckeditor.fields。当我尝试迁移或运行时,我得到了如下的错误。

Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/kush/projects/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 54, in wrapper
    fn(*args, **kwargs)
  File "/home/kush/projects/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
    autoreload.raise_last_exception()
  File "/home/kush/projects/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception
    raise _exception[1]
  File "/home/kush/projects/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 337, in execute
    autoreload.check_errors(django.setup)()
  File "/home/kush/projects/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 54, in wrapper
    fn(*args, **kwargs)
  File "/home/kush/projects/venv/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/kush/projects/venv/lib/python3.6/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/home/kush/projects/venv/lib/python3.6/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/home/kush/projects/venv/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'ckeditor_uploader'

我似乎不明白这里有什么问题。这里有人遇到过类似的问题吗?或者只是可以告诉我一些光在这里。

python django ckeditor
1个回答
0
投票

添加 ckeditorckeditor_uploader 对你的 INSTALLED_APPSsettings.py


0
投票

我已经按照@Nikkey的建议做了,但还是不行。我的django-ckeditor是3.6版本。我手动更新了ckeditor的5.9版本。问题已经解决了。

© www.soinside.com 2019 - 2024. All rights reserved.