Reputation: 159
i have installed django 1.10. And then ckeditor 5.0.3 When done with config i got an error "ImportError: No module named urls" There is config settings.py:
INSTALLED_APPS = [
...
'ckeditor',
]
CKEDITOR_UPLOAD_PATH = 'upload/'
There is urls.py:
from django.conf.urls import url, include
(r'^ckeditor/', include('ckeditor.urls')),
There is urls.py of ckeditor_uploader:
from __future__ import absolute_import
import django
from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from django.views.decorators.cache import never_cache
from . import views
if django.VERSION >= (1, 8):
urlpatterns = [
url(r'^upload/',
staff_member_required(views.upload),
name='ckeditor_upload'),
url(r'^browse/', never_cache(staff_member_required(views.browse)),
name='ckeditor_browse'),
]
else:
from django.conf.urls import patterns
urlpatterns = patterns(
'',
url(r'^upload/', staff_member_required(views.upload),
name='ckeditor_upload'),
url(r'^browse/', never_cache(staff_member_required(views.browse)),
name='ckeditor_browse'),
)
Please any help!
WSGI_APPLICATION:
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blago.settings")
application = get_wsgi_application()
Upvotes: 1
Views: 2417
Reputation: 1540
NOTICE: django-ckeditor 5 has backward incompatible code moves against 4.5.1.
File upload support have been moved to ckeditor_uploader. The urls are in ckeditor_uploader.urls while for file uploading widget you have to use RichTextUploadingField instead of RichTextField.
..
Add
ckeditor_uploader
to your INSTALLED_APPS setting.
...
Add CKEditor URL include to your project's urls.py file:
(r'^ckeditor/', include('ckeditor_uploader.urls')),
Upvotes: 2