|
CaptchaGenerators
Django Simple CaptchaAvailable GeneratorsThe following generators are available: Random charsClassic captcha that picks four random chars. This is case insensitive. CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.random_char_challenge'
Simple MathAnother classic, that challenges the user to resolve a simple math challenge by randomly picking two numbers between one and nine, and a random operator among plus, minus, times. CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.math_challenge'
Dictionary WordPicks a random word from a dictionary file. Note, you must define CAPTCHA_WORDS_DICTIONARY in CaptchaConfiguration to use this generator. CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.word_challenge'
Roll your ownTo have your own challenge generator, simply point CAPTCHA_CHALLENGE_FUNCT to a function that returns a tuple of strings: the first one (the challenge) will be rendered in the captcha, the second is the valid response to the challenge, e.g. ('5+10=', '15'), ('AAAA', 'aaaa') Sample generator that returns six random digits: def random_digit_challenge():
import random
ret = u''
for i in range(6):
ret += str(random.randint(0,9))
return ret, ret
|
very great work !!!
Modular, extensible yet simple design - good work.
Very good work!! Thanks....
Super!