I am trying to integrate django-tinymce with django-filebrowser for my django admin site. Everything (almost) works fine.
我正在尝试将django-tinymce与django-filebrowser集成到我的django管理站点。一切(几乎)都很好。
-
manage.py test filebrowser
, works ok -
http://localhost:8000/admin/filebrowser/browse/
works, too
manage.py test filebrowser,工作正常
http:// localhost:8000 / admin / filebrowser / browse / works
however when I press the browse
button on the windows popup of insert/edit image
of tinymce button panel nothing happens.
然而,当我按下窗口弹出窗口弹出的插入/编辑图像的tinymce按钮面板时,没有任何反应。
in my firefox debug window I get an error like this (when pressing browse
):
在我的firefox调试窗口中,我收到这样的错误(按下浏览时):
f is undefined
code: http://localhost:8000/static/js/tiny_mce/tiny_mce_src.js
line: 11981
and on my dev-server output window I get a 500 error like this:
在我的开发服务器输出窗口中,我收到500错误,如下所示:
GET /tinymce/filebrowser/ HTTP/1.1" 500
when admin page tries to load the tinymce_models.HTMLField()
text area.
当管理页面尝试加载tinymce_models.HTMLField()文本区域时,GET / tinymce / filebrowser / HTTP / 1.1“500。
Any ideas what am I doing wrong?
任何想法我做错了什么?
PS: I also use grappelli and this is my settings.py part that loads the apps:
PS:我也使用grappelli,这是我加载应用程序的settings.py部分:
INSTALLED_APPS = (
#... usual django standard apps.. #
'django.contrib.staticfiles',
'grappelli',
'filebrowser',
'tinymce',
'django.contrib.admin',
'expedeat.dbadmin',
)
1 个解决方案
#1
1
I finally managed to find the answer to my problem.
我终于找到了问题的答案。
I had to modify the tinymce/views.py file like this:
我不得不像这样修改tinymce / views.py文件:
fb_url = "%s://%s%s" % (request.is_secure() and 'https' or 'http',
#request.get_host(), urlresolvers.reverse('filebrowser-index'))
request.get_host(), urlresolvers.reverse('fb_browse'))
I found the answer in this post: http://www.mail-archive.com/django-users@googlegroups.com/msg100388.html
我在这篇文章中找到了答案:http://www.mail-archive.com/django-users@googlegroups.com/msg100388.html
#1
1
I finally managed to find the answer to my problem.
我终于找到了问题的答案。
I had to modify the tinymce/views.py file like this:
我不得不像这样修改tinymce / views.py文件:
fb_url = "%s://%s%s" % (request.is_secure() and 'https' or 'http',
#request.get_host(), urlresolvers.reverse('filebrowser-index'))
request.get_host(), urlresolvers.reverse('fb_browse'))
I found the answer in this post: http://www.mail-archive.com/django-users@googlegroups.com/msg100388.html
我在这篇文章中找到了答案:http://www.mail-archive.com/django-users@googlegroups.com/msg100388.html