hi all Im tryng to integrate a tinymce in a django admin page. I've installed the django-tinymce module (http://code.google.com/p/django-tinymce/) I followed the instructions so these are my files:
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')),
)
i have the tinymce's js in a folder in the root called media/js
In the model i've this line: text = tinymce_models.HTMLField()
when i run the server i don't get error but when i go in the admin area of my model the tinymce is not loaded. With firebug i see that the tinymce library give a 404 error but the path is correct.. i have some problem in my url.py?
thanks for the help
Are you just putting a folder in your project root called
media/js
? It actually needs to be served somehow from a url somewhere.The JavaScript file is loaded via your browser, so it needs to be accessible to the internet where all of your other media lives. This part has nothing to do with django, so you shouldn't expect errors or URL issues.
Once you've solved that part, specify the URL where the file can be accessed via the
TINYMCE_JS_URL
settings parameter.For example, on my setup, the js is..
Are you saying you can visit this URL path and the JS file loads? What I'm saying is: how is the path correct if it's a 404?