pythonsetup.pyinstall
二、
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文件
fromyour_project.tinymceimportmodelsastinymce_models
classPost(models.Model):
body=tinymce_models.HTMLField()