root/qPloneCaptchas/tags/1.2.1/config.py

Revision 848 (checked in by crchemist, 2 years ago)

Added captcha to join_form

  • Property svn:eol-style set to native
Line 
1 GLOBALS = globals()
2 PRODUCT_NAME = 'qPloneCaptchas'
3 CAPTCHAS_COUNT = 165
4 LAYERS = ['captchas', 'plone_captchas']
5 LAYER_JOIN_FORM = 'captchas_join_form'
6 LAYER_DISCUSSION = 'captchas_discussion'
7 LAYER_FORMMAILER = 'captchas_ploneformmailer'
8 LAYER_DYNAMIC_CAPTCHAS = 'plone_captchas/dynamic'
9 LAYER_STATIC_CAPTCHAS = 'plone_captchas/static'
10 ALL_LAYERS = LAYERS + [LAYER_DISCUSSION, LAYER_FORMMAILER,
11              LAYER_STATIC_CAPTCHAS, LAYER_DYNAMIC_CAPTCHAS, LAYER_JOIN_FORM]
12 TOOL_ICON = 'tool.gif'
13 TOOL_ID = 'portal_captchas'
14 CONFIGLET_ID = "prefs_captchas_setup_form"
15 CONFIGLET_NAME = "qPloneCaptchas setup"
16
17 DEFAULT_IMAGE_SIZE = 27
18 DEFAULT_BG = 'gray'
19 DEFAULT_FONT_COLOR = 'black'
20 DEFAULT_PERIOD = 0.1
21 DEFAULT_AMPLITUDE = 5
22 DEFAULT_OFFSET = (0.5, 0.5)
23 DEFAULT_DISTORTION = [DEFAULT_PERIOD, DEFAULT_AMPLITUDE, DEFAULT_OFFSET]
24
25 PROPERTIES = (('image_size', DEFAULT_IMAGE_SIZE, 'int'),
26               ('background', DEFAULT_BG, 'string'),
27               ('font_color', DEFAULT_FONT_COLOR, 'string'),
28               ('period', DEFAULT_PERIOD, 'float'),
29               ('amplitude', DEFAULT_AMPLITUDE, 'float'),
30               ('random_params', True, 'boolean'))
31
32 try:
33     import PIL
34     havePIL = True
35 except:
36     havePIL = False
Note: See TracBrowser for help on using the browser.