Django Ckeditor image browser not finding images

我们两清 提交于 2019-12-06 04:25:56

If this is in DEBUG/runserver mode, did you remember to add

from django.conf import settings
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

if settings.DEBUG:
    urlpatterns += patterns(
        '',
        url(
            r'^media/(?P<path>.*)$',
            'django.views.static.serve', {
                'document_root': settings.MEDIA_ROOT,
            }
        ),
    )

urlpatterns += staticfiles_urlpatterns()

to your urls.py

You are missing ckeditor image backend

CKEDITOR_IMAGE_BACKEND = "pillow"

Whenever I work with user files and images uploads, 9 times out of 10 the problem is due to bad permissions on the "CKEDITOR_UPLOAD_PATH" folder.

The red X probably is a fallback image in case something goes wrong, such as saving the upload to disk.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!