Grappelli Tinymce 缺少主题
我第一次设置tinymce、filebrowser、zinnia 和Grappelli。我认为我已正确设置所有内容,但似乎缺少一些文件,并且我不确定在哪里可以找到它们。我收到以下 400 个错误。
"GET /static/tiny_mce/themes/advanced/skins/grappelli/content.css HTTP/1.1" 404
"GET /static/tiny_mce/themes/advanced/skins/grappelli/ui.css HTTP/1.1" 404 1832
"GET /static/tiny_mce/plugins/grappelli/editor_plugin.js HTTP/1.1" 404 1820
"GET /static/tiny_mce/plugins/grappelli_contextmenu/editor_plugin.js HTTP/1.1" 404 1856
由于某种原因,tiny_mce 的 pip 安装版本不包含这些文件。
更新:
我现在可以使用该主题,但由于某种原因它从我下载的版本中丢失了。我仍然收到 404 错误,
"GET /static/tiny_mce/plugins/grappelli/editor_plugin.js HTTP/1.1" 404 1820
"GET /static/tiny_mce/plugins/grappelli_contextmenu/editor_plugin.js HTTP/1.1" 404 1856
tinymce 插件文件夹中似乎没有任何名为 grappeli 的文件夹。我已经运行了 ./manage.pycollectstatic 并知道我的所有文件都位于正确的位置。
谢谢, CG
I an setting up tinymce, filebrowser, zinnia, and Grappelli for the first time. I think I have everything setup properly, but it seems that I am missing some files and I am not sure where I can find them. I am getting 400 errors on the following.
"GET /static/tiny_mce/themes/advanced/skins/grappelli/content.css HTTP/1.1" 404
"GET /static/tiny_mce/themes/advanced/skins/grappelli/ui.css HTTP/1.1" 404 1832
"GET /static/tiny_mce/plugins/grappelli/editor_plugin.js HTTP/1.1" 404 1820
"GET /static/tiny_mce/plugins/grappelli_contextmenu/editor_plugin.js HTTP/1.1" 404 1856
For some reason the pip installed version of tiny_mce did not include these file.
UPDATE:
I now have the theme working, it was missing from my downloaded version for whatever reason. I am still getting 404's on
"GET /static/tiny_mce/plugins/grappelli/editor_plugin.js HTTP/1.1" 404 1820
"GET /static/tiny_mce/plugins/grappelli_contextmenu/editor_plugin.js HTTP/1.1" 404 1856
I don't seem to have any folder in the tinymce plugin folder called grappeli. I have ran the ./manage.py collectstatic and know all my files are in the proper location.
Thanks,
CG
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
tinymce 的 grappelli 皮肤 与 Grappelli 一起来。您还应该加载grappelli附带的tinymce的js文件,这样tinymce就会找到与tinymce js相关的主题文件。
您可以通过将
settings.py
文件中的TINYMCE_JS_URL
指向正确的 url 来实现此目的,例如TINYMCE_JS_URL = STATIC_URL +'grappelli/tinymce/jscripts/tiny_mce/tiny_mce.js'
。确保运行collectstatic
并且您的静态文件设置正确!The grappelli skings for tinymce come with grappelli. You also should load the js files for tinymce coming with grappelli, so tinymce will find the theme files relatively to the tinymce js.
You can achieve this by pointing
TINYMCE_JS_URL
in yoursettings.py
file to the right url, eg.TINYMCE_JS_URL = STATIC_URL +'grappelli/tinymce/jscripts/tiny_mce/tiny_mce.js'
. Make sure to runcollectstatic
and that your static files settings are correct!