1

我正在尝试为我的 django 管理站点将 django-tinymce 与 django-filebrowser 集成。一切(几乎)工作正常。

  • manage.py test filebrowser,工作正常
  • http://localhost:8000/admin/filebrowser/browse/也有效

但是,当我按下tinymce 按钮面板browse的窗口弹出窗口上 的按钮时,什么也没有发生。insert/edit image

在我的 Firefox 调试窗口中,我收到这样的错误(按 时browse):

f is undefined
code: http://localhost:8000/static/js/tiny_mce/tiny_mce_src.js
line: 11981

在我的开发服务器输出窗口中,我收到一个 500 错误,如下所示:

GET /tinymce/filebrowser/ HTTP/1.1" 500当管理页面尝试加载 tinymce_models.HTMLField()文本区域时。

任何想法我做错了什么?

PS:我也使用 grappelli,这是我的 settings.py 加载应用程序的部分:

INSTALLED_APPS = (
#... usual django standard apps.. #
    'django.contrib.staticfiles',
    'grappelli',
    'filebrowser',
    'tinymce',
    'django.contrib.admin',
    'expedeat.dbadmin',
)
4

1 回答 1

1

我终于设法找到了我的问题的答案。

我不得不像这样修改 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'))

我在这篇文章中找到了答案:http: //www.mail-archive.com/django-users@googlegroups.com/msg100388.html

于 2011-09-26T05:27:35.670 回答