ckeditor installing issue

Hello, I am trying to integrate CKeditor in my blog application.

from django.urls import reverse
from ckeditor.fields import RichTextField

body = RichTextField(blank= True, null = True)



STATIC_URL = '/static/'
STATIC_ROOT = '/home/developer/Projects/Giyu_Tomioka/blog/static'

MEDIA_URL = '/media/'
MEDIA_ROOT = '/home/developer/Projects/Giyu_Tomioka/blog/media'

when I migrate I get this error, I am unable to understand why.

Traceback (most recent call last):
  File "/home/developer/Projects/Giyu_Tomioka/", line 22, in <module>
  File "/home/developer/Projects/Giyu_Tomioka/", line 18, in main
  File "/home/developer/.local/lib/python3.9/site-packages/django/core/management/", line 419, in execute_from_command_line
  File "/home/developer/.local/lib/python3.9/site-packages/django/core/management/", line 395, in execute
  File "/home/developer/.local/lib/python3.9/site-packages/django/", line 24, in setup
  File "/home/developer/.local/lib/python3.9/site-packages/django/apps/", line 114, in populate
  File "/home/developer/.local/lib/python3.9/site-packages/django/apps/", line 301, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.9/importlib/", 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/", line 3, in <module>
    from ckeditor.fields import RichTextField
  File "/home/developer/.local/lib/python3.9/site-packages/ckeditor/", line 4, in <module>
    from ckeditor.widgets import CKEditorWidget
  File "/home/developer/.local/lib/python3.9/site-packages/ckeditor/", line 3, in <module>
    from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'

It looks like you’re trying to use a seriously old and obsolete package.

The package django.core.urlresolvers was deprecated in Django 1.10 and removed in Django 2.0.

You didn’t mention which version of Django you’re using, but you should find a more modern and current method for integrating ckeditor within Django.

I am using django 3.2.
It’s only when I add CKeditor into django I get this error

I just now update to django 4.0.2 still I am getting the same issue

I think you misunderstood my response. I wasn’t commenting about the version of Django you were using, but whatever package you selected to try and integrate CKeditor into Django.

You either need to:

  • Fix the CKeditor package you are using to work with whatever version of Django you want to use.
  • Find a different CKeditor package, one that works with your version of Django
  • Integrate CKeditor directly yourself without using a third-party package.

Thank You @KenWhitesell it worked I reinstalled ckeditort. I view the package /.local/lib/python3.9/site-packages/ckeditor/ and found that it was requesting the package.


This is my settings, maybe it can help you

from pathlib import Path
import os

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

# Quick-start development settings - unsuitable for production
# See

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-%$w+zdq!0x@_6h0c0n-&5z69m%&17#w1%ul@(&1si*&(@klqhw'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True


# Application definition

#    'blog.apps.BlogConfig', change to yours


#ROOT_URLCONF = 'grace2525-site.urls' change to yours

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [

#WSGI_APPLICATION = 'grace2525-site.wsgi.application'  change to yours

# Database

    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',

# Password validation

        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',

# Internationalization



USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)

STATIC_URL = '/static/'

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

# Default primary key field type

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

#ckeditor settings

MEDIA_ROOT =os.path.join(BASE_DIR, 'media')

MEDIA_URL = '/media/'

CKEDITOR_UPLOAD_PATH = 'ckeditor_uploads'

1 Like

Does this setting stay the same during deployment?

I think yes: it stays the same

On AWS what do be a good way to store the uploaded images? for production

That really is a different topic, potentially encountering a number of different issues. You may want to open up a new discussion topic here for that. (People seeing the “ckeditor installing issue” title might not browse further to see that the topic has actually changed.)

1 Like