【发布时间】:2019-01-03 10:15:03
【问题描述】:
使用 amazon S3 在服务器上部署 django + django-cms 项目后 (STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
),没有为 django-cms_text_ckeditor 加载静态文件,ckeditor 包正在尝试从本地存储加载静态文件,但它不起作用,
明显地。所有其他静态文件都从 s3 存储桶加载,没有任何问题。在 localhost ckeditor 捆绑包正在请求本地静态文件,并且它正在工作,其他静态文件从 s3 存储桶加载。
也许有人知道如何使用 s3 使捆绑加载静态,或者只是从项目服务器获取文件(如 localhost 行为)?此插件仅在管理员中使用,因此使用它加载服务器静态并不重要。
不适用于 ckeditor 默认设置,如自定义设置和从 ckeditor 官方网站加载的包。
谷歌显然没有成功,虽然我花了很多时间。
Django==1.11.13 django-cms_text_ckeditor==3.6.0
Loading failed for the <script> with source “http://myproject.herokuapp.com/static/cms_modules/ckeditor/config.js?t=G87E”. config:1
Loading failed for the <script> with source “http://myproject.herokuapp.com/static/cms_modules/ckeditor/skins/moonocolor/skin.js?t=G87E”. config:1
Loading failed for the <script> with source “http://myproject.herokuapp.com/static/cms_modules/ckeditor/lang/en.js?t=G87E”. config:1
TypeError: c[a] is undefined
【问题讨论】:
标签: django amazon-s3 ckeditor django-staticfiles djangocms-text-ckeditor