source: products/quintagroup.captcha.core/trunk/quintagroup/captcha/core/CaptchaTool.py @ 2678

Last change on this file since 2678 was 2180, checked in by kroman0, 14 years ago

Fixed DeprecationWarning? for plone4

File size: 836 bytes
Line 
1try:
2    from App.class_init import InitializeClass
3except ImportError:
4    from Globals import InitializeClass
5from AccessControl import ClassSecurityInfo
6from Products.Transience.Transience import TransientObjectContainer
7
8class CaptchaTool(TransientObjectContainer):
9    """portal_captcha tool class
10    """
11    meta_type = 'CaptchaTool'
12    security = ClassSecurityInfo()
13    security.declarePublic('addExpiredKey')
14
15    def __init__(self, id='portal_captchas', title='', timeout_mins=60, addNotification=None,
16                 delNotification=None, limit=0, period_secs=60):
17        TransientObjectContainer.__init__(self, id, title, timeout_mins, addNotification,
18                                          delNotification, limit, period_secs)
19
20    def addExpiredKey(self, key):
21        self.new(key)
22
23InitializeClass(CaptchaTool)
Note: See TracBrowser for help on using the repository browser.