Skip to content

Commit

Permalink
Merge pull request #14 from nimasmi/feature/django_recaptcha
Browse files Browse the repository at this point in the history
Import from django_recaptcha instead of captcha
  • Loading branch information
katdom13 committed Nov 23, 2023
2 parents 2393714 + 216f3b7 commit d95461e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
],
install_requires=["django-recaptcha"],
install_requires=["django-recaptcha>=4"],
extras_require={
"testing": testing_extras,
"docs": documentation_extras,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_forms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import absolute_import, unicode_literals

from captcha.fields import ReCaptchaField
from django.test import TestCase
from django_recaptcha.fields import ReCaptchaField
from home.models import TestCaptchaEmailFormField

from wagtailcaptcha.forms import WagtailCaptchaFormBuilder
Expand All @@ -26,7 +26,7 @@ def test_captcha_field_is_present(self):
self.assertIsInstance(
generated_fields[WagtailCaptchaFormBuilder.CAPTCHA_FIELD_NAME],
ReCaptchaField,
msg="Captcha field should be an instance of `captcha.fields.ReCaptchaField`.",
msg="Captcha field should be an instance of `django_recaptcha.fields.ReCaptchaField`.",
)

def test_user_defined_fields_are_present(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/testapp/testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"

# Silence some errors
SILENCED_SYSTEM_CHECKS = ["captcha.recaptcha_test_key_error"]
SILENCED_SYSTEM_CHECKS = ["django_recaptcha.recaptcha_test_key_error"]
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

try:
Expand Down
2 changes: 1 addition & 1 deletion wagtailcaptcha/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals

from captcha.fields import ReCaptchaField
from django_recaptcha.fields import ReCaptchaField
from wagtail.contrib.forms.forms import FormBuilder


Expand Down

0 comments on commit d95461e

Please sign in to comment.