django验证码模块使用
生活随笔
收集整理的這篇文章主要介紹了
django验证码模块使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.下載模塊
pip install django-simple-captcha2.在一級urls內配置URL
url(r'^captcha/', include('captcha.urls')),3.settiongs注冊
INSTALLED_APPS = ['captcha', ]4.生成驗證碼表數據庫
python manage.py migrate5.在forms組件中添加
from captcha.fields import CaptchaField captcha=CaptchaField()6.前端使用
{{ form.captcha}}
轉載于:https://www.cnblogs.com/xzcvblogs/p/11365781.html
總結
以上是生活随笔為你收集整理的django验证码模块使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Git复习(十二)之命令专场
- 下一篇: django邮箱验证模块