Last change
on this file since 1061 was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
-
Property svn:eol-style set to
native
|
File size:
410 bytes
|
Line | |
---|
1 | ## Script (Python) "getCaptcha" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters= |
---|
8 | ##title= |
---|
9 | from Products.qPloneCaptchas.utils import getCaptchasCount, formKey, \ |
---|
10 | encrypt |
---|
11 | |
---|
12 | from random import randint |
---|
13 | key = formKey(randint(0, getCaptchasCount(True))) |
---|
14 | encrypted_key = encrypt(context.captcha_key, key) |
---|
15 | |
---|
16 | return encrypted_key |
---|
Note: See
TracBrowser
for help on using the repository browser.