修正:CKEditor 插件不能与 django-ckeditor 一起使用

问题描述

我想安装easyimage插件。我将 zip 文件解压到 plugins 文件夹,因此它位于 for col in NUMERIC_COLUMNS: df[col] = pd.to_numeric(df[col])

settings.py

static/ckeditor/ckeditor/plugins/easyimage

我仍然收到错误 STATIC_ROOT = os.path.join(BASE_DIR,'static') STATIC_URL = '/static/' CKEDITOR_UPLOAD_PATH = 'uploads/' CKEDITOR_IMAGE_BACKEND = 'pillow' CKEDITOR_UPLOAD_PATH = 'uploads/' CKEDITOR_IMAGE_BACKEND = 'pillow' CKEDITOR_CONfigS = { 'default': { 'toolbar': 'Custom','toolbar_Custom': [ ['Bold','Italic','Underline'],['NumberedList','BulletedList'],['Link','Unlink'],['EasyImageUpload'] ],'width': '100%','height': 100,'extraPlugins': ','.join( [ 'easyimage',' 'dialog','balloontoolbar','cloudservices','button' ] ),},

GET http://192.168.0.3:8000/static/ckeditor/ckeditor/plugins/easyimage/plugin.js?t=K5H9 net::ERR_ABORTED 404 (Not Found)

编辑: 表单.py

ckeditor.js:270 Uncaught Error: [CKEDITOR.resourceManager.load] Resource name "easyimage" was not found at "http://192.168.0.3:8000/static/ckeditor/ckeditor/plugins/easyimage/plugin.js?t=K5H9".

models.py

from django import forms from ckeditor.widgets import CKEditorWidget from ckeditor_uploader.widgets import CKEditorUploadingWidget class TaskDescriptionForm(forms.Form): description = forms.CharField(widget=CKEditorUploadingWidget()) class Meta: fields = ['description']

Edit2:我添加了依赖项,但仍然得到 404。 Edit3:我的插件错误的目录中

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)