django-cms + grappelli [英] django-cms + grappelli

查看:139
本文介绍了django-cms + grappelli的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果有人知道如何使用grappelli进行django-cms,请提供一些提示


If anyone knows how to make django-cms play with grappelli, please give some tips

推荐答案

我刚刚经历了一场颇具史诗般的冒险,故事可能对你有用。所述冒险的终点是获得django-cms 2.1.3使用 django-filebrowser- no-grappelli 。虽然这可能听起来像你想要的相反,我最终在那里,因为我真正想要的是让django-cms与filebrowser一起工作。没有grappelli虽然标准的django-filebrowser不能按预期的方式工作。但是与grappelli django-cms不能按预期的方式工作。所以在这里揉搓,引用莎士比亚。使用filebrowser获取django-cms是相对简单的,除了当尝试使用uploadify(随filebrowser提供)上传文件时,在选择文件对话框中的文件后,没有任何反应。最终我发现这是因为jquery库被加载了两次:一次是通过filebrowser与uploadify一起使用,一次由django-cms加载。所以通过注释掉这个文件中的第二行:

Well I've just gone through a fairly epic adventure, the story of which might be of some use to you. The end point of said adventure was getting django-cms 2.1.3 working with django-filebrowser-no-grappelli . Whilst that may sound in fact like the opposite of what you want, I ended up there because what I really wanted was to get django-cms working with filebrowser. Without grappelli though the standard django-filebrowser does not work as expected. But with grappelli django-cms does not work as expected. So therein lay the rub, to quote shakespeare. Getting django-cms working with filebrowser was relatively straight forward except for the fact that when trying to upload files with uploadify (which is shipped with filebrowser), after selecting the files in the file dialog, nothing happened. Eventually I figured out that this was because the jquery library was being loaded twice: once by filebrowser for use with uploadify, and once by django-cms. So by commenting out the second line in this file:

你的网站包dir / cms / templates / cms / toolbar / toolbar.html

your site packages dir/cms/templates/cms/toolbar/toolbar.html

加载jquery.min.js,uploadify按预期工作。 Soooo ...如果你只是想得到django-cms使用grappelli,所以你可以使用filebrowser,上述可能是有帮助的。 这里是我的设置文件供参考。

which loads jquery.min.js, uploadify worked as expected. Soooo...if you just want to get django-cms working with grappelli so you can use filebrowser, the above might be helpful. Here is my settings file for reference.

这篇关于django-cms + grappelli的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆