Posts

Showing posts from October, 2016

Google recaptcha integration with django applicaton

Recently I have used google recaptcha with my django application for registration process. There are following steps to integrate with your django application.  Firstly go to this link -  https://developers.google.com/recaptcha/   and click on get started. Now click on  add  sign up api keys for google recaptcha. enter label name (e.g.- Myapp) and domain(e.g. - localhost) for your local project and saved the recaptcha copy the site key and secret key and added into your settings for example       RECAPTCHA_PUBLIC_KEY = '6LdUAAAAAD97sRFALHoKmVWbHxE7kdXAUCed' RECAPTCHA_PRIVATE_KEY = '6LUAAAAAARB_-RRMI4ynXAw8mDC8fVUrDud'  one thing more add RECAPTCHA_VERIFICATION_URL =  'https://www.google.com/recaptcha/api/siteverify'   in settings.py file which are used in your forms. Then go to your template where you show recaptcha . and add this code in your template. <div class="g-recaptcha" data-sitekey="6Ld_EwkUAAAAADmVWbHxE7kdXAUCed"