Changeset 438 for CMESS/captcha/trunk/com/zms/captcha/c_captcha_basic.py
- Timestamp:
- 02.03.2009 15:03:09 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMESS/captcha/trunk/com/zms/captcha/c_captcha_basic.py
r362 r438 1 1 from com.zms.captcha.CaptchasDotNet import CaptchasDotNet 2 from com.zms.captcha.PILCaptcha import * 2 try: 3 from com.zms.captcha.PILCaptcha import * 4 noPIL = False 5 except: 6 noPIL = True 3 7 from com.zms.captcha.reCaptcha import * 4 8 … … 59 63 def __init__(self, zms_context): 60 64 C_Captcha_Basic.__init__(self, zms_context) 61 65 62 66 self.id = 'PILCaptcha' 63 67 64 68 def GetContent(self): 69 if noPIL: 70 raise Exception 71 65 72 temp_img = generateImage(self.zms_context.temp_folder, 66 73 self.zms_context.attr_captcha.getObjProperty('pilcaptchaCharCount', self.zms_context.REQUEST), … … 76 83 77 84 def IsCodeValid(self): 85 if noPIL: 86 raise Exception 87 78 88 if (self.zms_context.REQUEST.SESSION['sess_captcha'] == self.zms_context.REQUEST.form.get('captcha_password', '')): 79 89 temp_result = (True, '')
Note: See TracChangeset
for help on using the changeset viewer.
