Reputation: 4149
I followed the installation guide for django-tinymce and Using TinyMCE in Django,
installed django-filebrowser, django-grapelli and django-tinymce with pip in virtual environment.
Fragments of
settings.py:
INSTALLED_APPS = (
...
'django.contrib.admin',
'tinymce',
)
TINYMCE_JS_URL = MEDIA_URL + 'js/tiny_mce/tiny_mce.js'
TINYMCE_JS_ROOT = MEDIA_ROOT + 'js/tiny_mce'
TINYMCE_DEFAULT_CONFIG = {
'plugins': "table,spellchecker,paste,searchreplace",
'theme': "advanced",
}
urls.py:
urlpatterns = patterns('',
...
(r'^tinymce/', include('tinymce.urls')),
# or (r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': os.path.join(settings.STATIC_ROOT, "admin/js/tiny_mce")},
)
_
import tinymce
in Python is successful, but when I try to run django (version 1.4) server, I get
Error: No module named tinymce
How to solve this problem?
Upvotes: 4
Views: 3236
Reputation: 106
I don't know what is going on, but after upgrading my pip to the latest version by typing: python.exe -m pip install --upgrade pip
and installing tinymce
again, it works perfectly.
Upvotes: 0
Reputation: 416
If you installed the module in the right environment. You will have to run
python manage.py collectstatic
I was having the same problem. I ran this collectstatic command and after pushing the statics on the server my issue got fixed.
Upvotes: 1
Reputation: 53998
It sounds like you installed the packages into the wrong virtualenv.
Upvotes: 2