django验证码插件captcha以及富文本编辑器tinymce部署
安装captcha、tinymce
pip install django-simple-captcha
pip install django-tinymce
setting.py中引入captcha, tinymce
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'user',
'cart',
'order',
'goods',
'tinymce', # 富文本编辑器,需要使用pip install django-tinymce安装
'captcha', # 验证码插件captcha, 使用pip install django-simple-captcha安装
]
项目文件中urls.py中配置captcha, tinymce
from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^captcha/', include('captcha.urls')),
url(r'^tinymce/', include('captcha.urls')),
]