Django验证码库 DjangoCaptcha
- 授权协议: Apache
- 开发语言: Python
- 操作系统: 跨平台
- 软件首页: https://github.com/tianyu0915/DjangoCaptcha
- 软件文档: https://github.com/tianyu0915/DjangoCaptcha
软件介绍
在django中生成英文单词验证码,提供验证码图片生成,检查验证码等功能 原用于pythoner.net的验证码,现整理出来打包发布到pypi.
新特性
- 新增数字验证码模式
- 字体尺寸根据图片长宽自适应
Usage
Install
pip install DjangoCaptcha or easy_install DjangoCaptcha
Display(views.py)
from DjangoCaptcha import Captcha
def code(request):
ca = Captcha(request)
ca.words = ['hello','world','helloworld']
ca.type = 'number'
return ca.display()
Check user input(views.py)
from DjangoCaptcha import Captcha
def index(request):
_code = request.GET.get('code') or ''
if not _code:
return render('index.html',locals())
ca = Captcha(request)
if ca.check(_code):
return HttpResponse('验证成功')
else:
return HttpResponse('验证失败')
Custom
width of image
ca.img_width = 150
height of image
ca.img_height = 30
type fo code ('number'/'word')
ca.type = 'number'
Rely on
- PIL
More
高可用MySQL
)Charles Bell Mats Kindahl Lars Thalmann / 宁青、唐李洋 诸云萍 / 电子工业出版社 / 2011-10 / 98.00元
《高可用mysql:构建健壮的数据中心》是“mysql high availability”的中文翻译版,主要讲解真实环境下如何使用mysql 的复制、集群和监控特性,揭示mysql 可靠性和高可用性的方方面面。本书由mysql 开发团队亲自执笔,定位于解决mysql 数据库的常见应用瓶颈,在保持mysql 的持续可用性的前提下,挖潜各种提高性能的解决方案。本书分为三个部分。第一部分讲述mysql......一起来看看 《高可用MySQL》 这本书的介绍吧!
