Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django-ckeditor';s的内容在管理页面中显示时未采用html样式_Html_Django_Ckeditor_Django Ckeditor - Fatal编程技术网

Django-ckeditor';s的内容在管理页面中显示时未采用html样式

Django-ckeditor';s的内容在管理页面中显示时未采用html样式,html,django,ckeditor,django-ckeditor,Html,Django,Ckeditor,Django Ckeditor,我正在将django ckeditor 5.8.0与python3.6一起使用,django 2.2.5onubuntu 18.04.3 settings.py CKEDITOR\u配置={ “默认值”:{ “皮肤”:“月亮”, “宽度”:“100%”, “基本工具栏”:[ ['Source'、'-'、'Bold'、'Italic'] ], {'name':'段落', '项目':['NumberedList'、'BulletedList'、'-'、'Outdent'、'Indent'、'-'、'

我正在将django ckeditor 5.8.0与python3.6一起使用,
django 2.2.5
on
ubuntu 18.04.3

settings.py

CKEDITOR\u配置={
“默认值”:{
“皮肤”:“月亮”,
“宽度”:“100%”,
“基本工具栏”:[
['Source'、'-'、'Bold'、'Italic']
],
{'name':'段落',
'项目':['NumberedList'、'BulletedList'、'-'、'Outdent'、'Indent'、'-'、'Blockquote'、'CreateDiv'、'-',
“JustifyLeft”、“JustifCenter”、“JustifyRight”、“JustifyBlock”、““-”、“BidiLtr”、“BidiRtl”,
“语言”]},
{'name':'links','items':['Link','Unlink','Anchor']},
{'name':'insert',
'items':['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
'/',
{'name':'style','items':[
'样式'、'格式'、'字体'、'字体大小']},
'/',
{'name':'yourcustomtools','items':[
“代码片段”,
]},
],
“工具栏”:“YourCustomToolbarConfig”,
“tabSpaces”:4,
“extraPlugins':','。加入([
“上传图像”,
“代码片段”,
]),
}
}
型号

content=RichTextUploadingField()
CKEditor的
静态
文件以
管理
模式提供,但是
css
文件(
contents.css
)不会加载到其他
视图

我正在使用
ManifestStaticFilesStorage
,在运行
collectstatic
之后,文件就存在于它应该存在的地方

我还在
模板中添加了以下行:

window.CKEDITOR_BASEPATH=“{%static'/CKEDITOR/CKEDITOR/'%}”;
***
{{content | safe}}
以下是浏览器中的
html
图像:

单击这两个
js
文件也会显示其内容,这意味着它们可以访问

contents.css
文件未加载,因此没有样式

开发
服务器上也有同样的故事


任何解决这个问题的建议都很好。

您希望加载CSS的标记在哪里?
django ckeditor
js
文件应该动态加载。您的浏览器开发工具中是否出现网络错误?不。这是我无法理解的。您的标记在哪里是否希望加载CSS?
django ckeditor
js
文件预计将动态加载。您的浏览器开发工具中是否出现网络错误?否。这是我无法理解的。