标签云

微信群

扫码加入我们

WeChat QR Code

I am a beginner in django (django 1.7 python 2.7).I am trying to add no captcha recaptcha onto my django reset password form.I am trying to use this recaptcha djano plugin.I have followed the instructions and added the necessay settings:Installed django-recaptcha to the Python path.Added captcha to the INSTALLED_APPS setting.Added the following to my settings.py file:RECAPTCHA_PUBLIC_KEY = '76wtgdfsjhsydt7r5FFGFhgsdfytd656sad75fgh' # fake - for the purpose of this post.RECAPTCHA_PRIVATE_KEY = '98dfg6df7g56df6gdfgdfg65JHJH656565GFGFGs' # fake - for the purpose of this post.NOCAPTCHA = TrueThe instructions then advise to add the captcha to the form, like so:from django import formsfrom captcha.fields import ReCaptchaFieldclass FormWithCaptcha(forms.Form):captcha = ReCaptchaField()How do I access the built in reset password form? As a beginner, I suspect that I have to customise the built in reset password form, but how do I do that? I am not even sure where the built in reset password form is. An example of how to customise the build in reset password form or a push to a tutorial would be handy.I have searched SO & google, but could not find anything suitable.


Alasdair, thanks for the code. I changed some of the code, but you definately pushed me over the finish line.

2019年07月24日35分35秒

Glad you got it working! If there's any mistakes in the code, you can suggest an edit to help future visitors.

2019年07月24日35分35秒

Alasdir, no mistakes in code, just changed it for my form/url etc. environment. Thanks again.

2019年07月24日35分35秒