django入门6引入验证码插件 django-simple-captcha

Django的验证码插件

https://github.com/mbi/django-simple-captcha

安装

(mxonline) C:\Users\ws>pip install  django-simple-captcha==0.4.6

添加到settings.py中

配置urls.py

创建数据表

manage.py@mxonline > makemigrations

manage.py@mxonline > migrate

在forms中引用

Views中定义

页面中引用

猜你喜欢

转载自www.cnblogs.com/reblue520/p/12050173.html