django 验证码
https://code.google.com/p/django-simple-captcha/
下载后 python setup.py install
django-simple-captcha\captcha 拷贝到django app目录 就是 manage.py 同一级目录
修改 setting.py INSTALLED_APPS 加入一条 "yourApp.captcha"
urls.py urlpatterns 加入一条 url(r'^captcha/', include('captcha.urls')),
你的forms.py 顶部加入一条 from captcha.fields import CaptchaField
class xxxForm(forms.Form):
"加一条
captcha = CaptchaField()
项目首页有使用说明
另外需要同步一下数据库 python manage.py syncdb 会建表 输入yes回车即可

浙公网安备 33010602011771号