source: products/quintagroup.captcha.core/trunk/quintagroup/captcha/core/skins/captcha_core/static/getCaptchaImage.py @ 1954

Last change on this file since 1954 was 1954, checked in by mylan, 14 years ago

#172: Fix imports and domain name: rename 'plonecaptchas' into 'captcha.core'

File size: 480 bytes
Line 
1## Script (Python) "getCaptchaImage"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=
9from quintagroup.captcha.core.utils import gen_captcha, decrypt, \
10    getWord, parseKey
11
12hk = context.REQUEST.traverse_subpath[0]
13dk = decrypt(context.captcha_key, hk)
14key = parseKey(dk)['key']
15img = getattr(context, '%s.jpg' % key)
16return img.index_html(context.REQUEST, context.REQUEST.RESPONSE)
Note: See TracBrowser for help on using the repository browser.