1-我想安裝tinymce。不django-tinymce(出於某種原因)Django:如何安裝tinymce?
2 - 我不想使用admin.py方法(出於某種原因)
我想這樣做,它做的事情我的方法:
在urls.py:
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'cms.views.home', name='home'),
# url(r'^cms/', include('cms.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(url(r'^admin/', include(admin.site.urls)),
(r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve',
{ 'document_root': 'C:/Documents and Settings/Administrator/Desktop/django-projects/cms/javascript/tinymce/jscripts/tiny_mce' },
)))
在
管理員/的flatpages /簡單頁面/ change_form.html
<script type="text/javascript" src="{{ jsi18nurl|default:"../../../jsi18n/" }}"></script>
<script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode: "textareas",
theme: "simple"
});
3天前,我沒有得到任何錯誤,但TinyMCE的不會顯示,現在,我試着做一遍,我也得到這個錯誤
invalid syntax (urls.py, line 22)
UPDATE
invalid syntax (urls.py, line 22)
不見了
現在我看到dictionary update sequence element #0 has length 23; 2 is required
@Denis Kabalkin稱
IF我不喜歡這樣
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls),
url(r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve',
{ 'document_root': 'C:/Documents and Settings/Administrator/Desktop/django-projects/cms/javascript/tinymce/jscripts/tiny_mce' }),
)
我得到invalid syntax (urls.py, line 12)
IF我不喜歡這樣
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'cms.views.home', name='home'),
# url(r'^cms/', include('cms.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
url(r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve',{ 'document_root': 'C:/Documents and Settings/Administrator/Desktop/django-projects/cms/javascript/tinymce/jscripts/tiny_mce'}),
)
我看不出有什麼錯誤,但TinyMCE的將不被顯示
你使用什麼版本的tinymce? –