Django-tinymce 不工作;获取一个普通的文本区域
我正在尝试使用 django-tinymce 来创建可通过 Django 管理员使用 TinyMCE 字段进行编辑的字段。我使用 tinymce.models.HTMLField
作为此字段。
问题是它不起作用。我得到一个普通的文本区域。我检查了 HTML 源代码,看起来 TinyMCE 所需的所有代码都在那里。我还确认静态提供的 JavaScript 文件确实正在提供服务。但由于某种原因它不起作用。
但我确实注意到,如果我避免在设置文件中设置 TINYMCE_COMPRESSOR = True,它就会开始工作。什么会导致这种行为?
I'm trying to use django-tinymce
to make fields that are editable through Django's admin with a TinyMCE field. I am using tinymce.models.HTMLField
as the field for this.
The problem is it's not working. I get a normal textarea. I check the HTML source, and it seems like all the code needed for TinyMCE is there. I also confirmed that the statically-served JavaScript file is indeed being served. But for some reason it isn't working.
What I did notice though, is that if I avoid setting TINYMCE_COMPRESSOR = True
in the settings file, it does start to work. What can cause this behavior?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的网络服务器和网络浏览器是什么。也许它正在尝试设置 gzip/bzip 标头,而服务器没有处理它......所以它输出纯文本,但客户端期望压缩?
What are your webserver and web browser. Perhaps it is trying to set the gzip/bzip header and the server isn't processing it... so it goes out plaintext but the client expects compressed?