【发布时间】:2011-06-30 20:07:36
【问题描述】:
大家好 我正在尝试将 tinymce 集成到 django 管理页面中。 我已经安装了 django-tinymce 模块(http://code.google.com/p/django-tinymce/) 我按照说明进行操作,所以这些是我的文件:
settings.py
INSTALLED_APPS = (
...
'tinymce',
)
TINYMCE_DEFAULT_CONFIG = {
'plugins': "table,paste,searchreplace",
'theme': "advanced",
}
TINYMCE_SPELLCHECKER = False
TINYMCE_COMPRESSOR = False
url.py
urlpatterns = patterns('',
# Example:
# (r'^uboPy/', include('uboPy.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
(r'^tinymce/', include('tinymce.urls')),
)
我将 tinymce 的 js 放在名为 media/js 的根文件夹中
在模型中我有这条线:text = tinymce_models.HTMLField()
当我运行服务器时,我没有收到错误,但是当我进入模型的管理区域时,未加载 tinymce。使用 firebug,我看到 tinymce 库出现 404 错误,但路径是正确的。我的 url.py 有问题?
感谢您的帮助
【问题讨论】:
标签: python django tinymce urlconf