I have integrated Recaptcha with dJango. dJango Snippet - Recaptcha
The view which is showing the page is - from baseapp.recaptcha import captcha
def showHome(request):
if(request.user.is_authenticated()):
tempEmail = request.session.get('id')
return render_to_response('logreg/login-register.html', {'emailFromForm':tempEmail}, context_instance=RequestContext(request));
else:
request.session.set_test_cookie()
form = RegistrationForm()
loginForm = LoginForm()
html_captcha = captcha.displayhtml(settings.RECAPTCHA_PUB_KEY)
print "Captcha HTML is : %s" % html_captcha
return render_to_response('logreg/login-register.html', {'form': form, 'loginForm':loginForm, 'html_captcha':html_captcha}) `
Here is the code in html -
<div id="register-dialog" title="Register yourself">
<p id="validateTips">All form fields are required.</p>
{% if error %}
{{ error }}
{% endif %}
<form name="registrationForm" action="registerUser/" method="post">
{{ form.as_p }}
{{ html_captcha }}
</form>
</div>
It works great in IE & Chrome, but firefox shows me an exception at line 451 in recaptcha.
Here is the code at that line var $ST = RecaptchaState;
Any thoughts are appreciated !
Note : Firefox version - 3.6; IE - 8; Chrome - 4.0