Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Use reCaptcha's noCaptcha

Roland Geiderda6cb53c602d
diff --git a/wger/config/tests/test_gym_config.py b/wger/config/tests/test_gym_config.py
index 0ce5958f8..866c4e841 100644
--- a/wger/config/tests/test_gym_config.py
+++ b/wger/config/tests/test_gym_config.py
@@ -44,7 +44,7 @@ class GymConfigTestCase(WorkoutManagerTestCase):
'password1': 'secret',
'password2': 'secret',
'email': '[email protected]',
- 'recaptcha_response_field': 'PASSED', }
+ 'g-recaptcha-response': 'PASSED', }
self.client.post(reverse('core:user:registration'), registration_data)
new_user = User.objects.all().last()
@@ -65,7 +65,7 @@ class GymConfigTestCase(WorkoutManagerTestCase):
'password1': 'secret',
'password2': 'secret',
'email': '[email protected]',
- 'recaptcha_response_field': 'PASSED', }
+ 'g-recaptcha-response': 'PASSED', }
self.client.post(reverse('core:user:registration'), registration_data)
new_user = User.objects.all().last()
diff --git a/wger/core/tests/test_feedback.py b/wger/core/tests/test_feedback.py
index bf9776913..107e7192a 100644
--- a/wger/core/tests/test_feedback.py
+++ b/wger/core/tests/test_feedback.py
@@ -50,7 +50,7 @@ class FeedbackTestCase(WorkoutManagerTestCase):
# Correctly filled in reCaptcha
response = self.client.post(reverse('core:feedback'),
{'comment': 'A very long and interesting comment',
- 'recaptcha_response_field': 'PASSED'})
+ 'g-recaptcha-response': 'PASSED'})
self.assertEqual(response.status_code, 302)
self.assertEqual(len(mail.outbox), 1)
response = self.client.get(response['Location'])
diff --git a/wger/core/tests/test_registration.py b/wger/core/tests/test_registration.py
index bd4c4d988..97164badc 100644
--- a/wger/core/tests/test_registration.py
+++ b/wger/core/tests/test_registration.py
@@ -53,7 +53,7 @@ class RegistrationTestCase(WorkoutManagerTestCase):
'password1': 'secret',
'password2': 'secret',
'email': 'not an email',
- 'recaptcha_response_field': 'PASSED', }
+ 'g-recaptcha-response': 'PASSED', }
count_before = User.objects.count()
# Wrong email
diff --git a/wger/main.py b/wger/main.py
index 58ac3dc36..c04d9bc47 100755
--- a/wger/main.py
+++ b/wger/main.py
@@ -62,6 +62,7 @@ SECRET_KEY = %(default_key)r
# Your reCaptcha keys
RECAPTCHA_PUBLIC_KEY = '%(recaptcha_public_key)s'
RECAPTCHA_PRIVATE_KEY = '%(recaptcha_private_key)s'
+NOCAPTCHA = True
# The site's URL (e.g. http://www.my-local-gym.com or http://localhost:8000)
# This is needed for Mozilla's BrowserID to work