Young87

当前位置:首页 >个人收藏

在Django中实现验证码

在项目中用到验证码,懒得去找,自己随便写了一个:
views.py:
 
 
urls.py:
  
 
template:
 
 
 
原文地址:[url]http://openexperience.javaeye.com/blog/157549[/url]

 

 

转者注:
这个例子还需要下载Python Imaging Library(PIL),这里下载最新版本[url]http://www.pythonware.com/products/pil/index.htm#pil116[/url]
还需要导入的模块:from datetime import datetime, import md5, cStringIO

除特别声明,本站所有文章均为原创,如需转载请以超级链接形式注明出处:SmartCat's Blog

上一篇: Linux中用命令清空回收站

下一篇: (python)http://www.python.org/

精华推荐