Hello, I am trying to integrate CKeditor in my blog application.
models.py
from django.urls import reverse
from ckeditor.fields import RichTextField
body = RichTextField(blank= True, null = True)
settings.py
INSTALLED_APPS = [
'ckeditor',
'ckeditor_uploader',
]
STATIC_URL = '/static/'
STATIC_ROOT = '/home/developer/Projects/Giyu_Tomioka/blog/static'
MEDIA_URL = '/media/'
MEDIA_ROOT = '/home/developer/Projects/Giyu_Tomioka/blog/media'
CKEDITOR_UPLOAD_PATH = "uploads/"
when I migrate I get this error, I am unable to understand why.
Traceback (most recent call last):
File "/home/developer/Projects/Giyu_Tomioka/manage.py", line 22, in <module>
main()
File "/home/developer/Projects/Giyu_Tomioka/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/developer/.local/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/home/developer/.local/lib/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute
django.setup()
File "/home/developer/.local/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/developer/.local/lib/python3.9/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/home/developer/.local/lib/python3.9/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/developer/Projects/Giyu_Tomioka/blog/models.py", line 3, in <module>
from ckeditor.fields import RichTextField
File "/home/developer/.local/lib/python3.9/site-packages/ckeditor/fields.py", line 4, in <module>
from ckeditor.widgets import CKEditorWidget
File "/home/developer/.local/lib/python3.9/site-packages/ckeditor/widgets.py", line 3, in <module>
from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'