我當時用的步驟如下,(這是在windows下的本地環境裡)你可以試試:一、下載安裝python setup.py install二、1.將tinymce/static/tiny_mce資料夾放到your_project/static目錄下;2.將tinymce資料夾放到your_project目錄下三、在urls.py檔案中加入:url(r"^tinymce/",include("tinymce.urls")),四、在settings.py檔案中加入:INSTALLED_APPS = ( "tinymce",)五、在settings.py檔案中加入:TINYMCE_JS_URL=MEDIA_URL+"/static/tiny_mce/tiny_mce_src.js"TINYMCE_JS_ROOT=MEDIA_ROOT+"/static/tiny_mce/"六、在settings.py檔案中加入:TINYMCE_DEFAULT_CONFIG = {"theme": "advanced","theme_advanced_toolbar_location" : "top","theme_advanced_toolbar_align" : "left",‘width’: 600,‘height’: 400,}七、修改models.py檔案from your_project.tinymce import models as tinymce_modelsclass Post(models.Model): body=tinymce_models.HTMLField()
我當時用的步驟如下,(這是在windows下的本地環境裡)你可以試試:一、下載安裝python setup.py install二、1.將tinymce/static/tiny_mce資料夾放到your_project/static目錄下;2.將tinymce資料夾放到your_project目錄下三、在urls.py檔案中加入:url(r"^tinymce/",include("tinymce.urls")),四、在settings.py檔案中加入:INSTALLED_APPS = ( "tinymce",)五、在settings.py檔案中加入:TINYMCE_JS_URL=MEDIA_URL+"/static/tiny_mce/tiny_mce_src.js"TINYMCE_JS_ROOT=MEDIA_ROOT+"/static/tiny_mce/"六、在settings.py檔案中加入:TINYMCE_DEFAULT_CONFIG = {"theme": "advanced","theme_advanced_toolbar_location" : "top","theme_advanced_toolbar_align" : "left",‘width’: 600,‘height’: 400,}七、修改models.py檔案from your_project.tinymce import models as tinymce_modelsclass Post(models.Model): body=tinymce_models.HTMLField()