hello friends, every html or email_body template file for the registration controller may now be loaded from another location, according to configuration options.
recaptcha may now be disabled. to use it, you may need the attached patch (else recaptcha doesn't work for me). -- alex
diff -Naur -x '*.pyc' tw.recaptcha-0.8-py2.5.egg/tw/recaptcha/validator.py tw.recaptcha-0.8-py2.5.egg1/tw/recaptcha/validator.py
--- tw.recaptcha-0.8-py2.5.egg/tw/recaptcha/validator.py 2009-07-02 09:22:45.000000000 +0300
+++ tw.recaptcha-0.8-py2.5.egg1/tw/recaptcha/validator.py 2009-07-02 08:43:56.000000000 +0300
@@ -14,6 +14,7 @@
'incorrect': _("Incorrect value."),
'missing': _("Missing value."),
}
+ challenged = {}
verify_server = "api-verify.recaptcha.net"
__unpackargs__ = ('*', 'field_names')
@@ -37,6 +38,9 @@
def validate_python(self, field_dict, state):
challenge = field_dict['recaptcha_challenge_field']
+ if challenge in ReCaptchaValidator.challenged:
+ del ReCaptchaValidator.challenged[challenge]
+ return # check only once
response = field_dict['recaptcha_response_field']
if response == '' or challenge == '':
error = Invalid(self.message('missing', state), field_dict, state)
@@ -64,4 +68,6 @@
error = Invalid(self.message('incorrect', state), field_dict, state)
error.error_dict = {'recaptcha_response_field':self.message('incorrect', state)}
raise error
+
+ ReCaptchaValidator.challenged[challenge] = 1
return True
smime.p7s
Description: S/MIME Cryptographic Signature

