root/qPloneCaptchas/tags/1.1.0/config.py

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

Some optimizations.

  • 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_DISCUSSION = 'captchas_discussion'
6 LAYER_FORMMAILER = 'captchas_ploneformmailer'
7 LAYER_DYNAMIC_CAPTCHAS = 'plone_captchas/dynamic'
8 LAYER_STATIC_CAPTCHAS = 'plone_captchas/static'
9 ALL_LAYERS = LAYERS + [LAYER_DISCUSSION, LAYER_FORMMAILER, LAYER_STATIC_CAPTCHAS, LAYER_DYNAMIC_CAPTCHAS]
10 TOOL_ICON = 'tool.gif'
11 TOOL_ID = 'portal_captchas'
12 CONFIGLET_ID = "prefs_captchas_setup_form"
13 CONFIGLET_NAME = "qPloneCaptchas setup"
14
15 DEFAULT_IMAGE_SIZE = 27
16 DEFAULT_BG = 'gray'
17 DEFAULT_FONT_COLOR = 'black'
18 DEFAULT_PERIOD = 0.1
19 DEFAULT_AMPLITUDE = 5
20 DEFAULT_OFFSET = (0.5, 0.5)
21 DEFAULT_DISTORTION = [DEFAULT_PERIOD, DEFAULT_AMPLITUDE, DEFAULT_OFFSET]
22
23 PROPERTIES = (('image_size', DEFAULT_IMAGE_SIZE, 'int'),
24               ('background', DEFAULT_BG, 'string'),
25               ('font_color', DEFAULT_FONT_COLOR, 'string'),
26               ('period', DEFAULT_PERIOD, 'float'),
27               ('amplitude', DEFAULT_AMPLITUDE, 'float'),
28               ('random_params', True, 'boolean'))
29
30 try:
31     import PIL
32     havePIL = True
33 except:
34     havePIL = False
Note: See TracBrowser for help on using the browser.