Ignore:
Timestamp:
7 Dec 2011, 06:01:35 (13 years ago)
Author:
uli
Message:

Be more verbose.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/captcha.py

    r7297 r7299  
    189189##
    190190class IdCaptcha(object):
     191    """The IdCaptcha allows all solutions that equal a challenge.
     192
     193    The challenge is a permutation of 'abcdefg'.
     194
     195    It is of no use for real world but for tests. In tests we cannot
     196    easily solve really strong captchas. But we can use a captcha that
     197    works like a real one but is easy to solve even for machines.
     198
     199    It is called IdCaptcha because solutions and challenges for this
     200    captcha type are mapped by identitiy function.
     201    """
    191202    grok.implements(ICaptcha)
    192203
     
    197208
    198209    def verify(self, request):
     210        """Verify that a solution sent equals the challenge.
     211        """
    199212        form = getattr(request, 'form', {})
    200213        solution=form.get(self.sol_field, None)
     
    205218
    206219    def display(self, error_code=None):
     220        """Display challenge and input field for solution as HTML.
     221        """
    207222        challenge = list('abcdef')
    208223        random().shuffle(challenge)
Note: See TracChangeset for help on using the changeset viewer.