首页 > 解决方案 > django-ckeditor 没有出现在 Django 的 grappelli 管理员上

问题描述

我正在尝试在 Django 的 grappelli 管理员上使用 ckeditor。在本地环境中,它运行良好并且显示良好。但是,在将其部署到生产环境后。编辑器没有出现。

就像您在下图中看到的那样,它只是空白,什么都没有。

在此处输入图像描述

设置.py

DJANGO_APPS = [
    ...
    'ckeditor',
    'ckeditor_uploader'
]

CKEDITOR_UPLOAD_PATH = "ckeditor_uploads/"

CKEDITOR_CONFIGS = {
    'default': {
        'toolbar': [["Format", "Bold", "Italic", "Underline", "Strike", "SpellChecker"],
                    ['NumberedList', 'BulletedList', "Indent", "Outdent", 'JustifyLeft', 'JustifyCenter',
                     'JustifyRight', 'JustifyBlock'],
                    ["Image", "Table", "Link", "Unlink", "Anchor", "SectionLink",
                        "Subscript", "Superscript"], ['Undo', 'Redo'], ["Source"],
                    ["Maximize"]],
    },
}

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

这些都是我的 Django 应用程序中 ckeditor 的所有设置。有谁知道为什么会这样?

标签: djangockeditor

解决方案


推荐阅读