Dear,

I am using your django-recaptcha application but I am havig a problem. Seems the validation step is not done properly ONLY if I use the javascript code.

I've edited the django/forms/widgets.py file and added print data at line 209 (I am using django 1.5), once I am filling the form and click on submit, the console output is this one:

<QueryDict: {u'username': [u'p2'], u'password1': [u'1'], u'csrfmiddlewaretoken': [u'oblablaq'], u'email': [u'[email protected]'], u'password2': [u'1']}>

And here is missing the 'recaptcha_response_field' key. Therefore, it is not possible to validate with the google servers.

The javascript generated inside django is this one:
-----------------------------------------
<form method='post' action=''><input type='hidden' name='csrfmiddlewaretoken' value='oblablaq' /> <tr><th><label for="id_recaptcha">Recaptcha:</label></th><td><ul class="errorlist"><li>This field is required.</li></ul><script type="text/javascript">
    var DjangoRecaptchaOptions = {
  "lang": "en"
};
    if (typeof RecaptchaOptions !== 'object') {
        RecaptchaOptions = DjangoRecaptchaOptions;
    } else {
        for (key in DjangoRecaptchaOptions) {
            RecaptchaOptions[key] = DjangoRecaptchaOptions[key];
        }
    }
</script>
<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6blablaEhC&hl=en";></script>
<noscript>
<iframe src="http://www.google.com/recaptcha/api/noscript?k=6blablahC&hl=en"; height="300" width="500" frameborder="0"></iframe><br />
  <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type='hidden' name='recaptcha_response_field' value='manual_challenge' />
</noscript>
</td></tr>
<tr><td></td><td><input type="submit" value="Send activation email" /></td>
    </form>
-----------------------------------------

Shouldn't exist a input tag with a name attribute with the name 'recaptcha_response_field' and the response of the google key?

Thanks a lot,
Xavi

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to