Error: No module named tinymce

ぃ、小莉子 提交于 2019-12-10 18:40:23

问题


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?


回答1:


It sounds like you installed the packages into the wrong virtualenv.




回答2:


try

import yourprojectname.tinymce


来源:https://stackoverflow.com/questions/11930411/error-no-module-named-tinymce

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!