Grappelli Tinymce 缺少主题

发布于 2024-12-10 13:12:06 字数 866 浏览 0 评论 0原文

我第一次设置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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逆光飞翔i 2024-12-17 13:12:06

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 your settings.py file to the right url, eg. TINYMCE_JS_URL = STATIC_URL +'grappelli/tinymce/jscripts/tiny_mce/tiny_mce.js'. Make sure to run collectstatic and that your static files settings are correct!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文