Unverified Commit daf8335e authored by Johannes Tomren Røsvik's avatar Johannes Tomren Røsvik
Browse files

Move recaptcha key to settings.py

parent 2f39c063
Pipeline #73386 passed with stage
in 58 seconds
......@@ -23,6 +23,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '$n%^#g%qx#82w6t^dvjqwv)q*1cy+fwh1ohku7-rbjqcei2^jr'
RECAPTCHA_KEY = '6Ld1AN8UAAAAAGENA-uPsuCVBPydoONxPjGip2fO'
ADMINS = [('APU', 'tdt4242apu@gmail.com')]
......
......@@ -7,10 +7,10 @@ from django.contrib import messages
import urllib
import json
import agreelance.settings
from .forms import SignUpForm
SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify'
SITE_SECRET = '<ENTER SITE SECRET HERE>'
RECAPTCHA_RESPONSE_PARAM = 'g-recaptcha-response'
def index(request):
......@@ -50,7 +50,7 @@ def signup(request):
def verify_recapcha(recaptcha_response):
url = SITE_VERIFY_URL
values = {
'secret': SITE_SECRET,
'secret': agreelance.settings.RECAPTCHA_KEY,
'response': recaptcha_response
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment