diff --git a/accounts/forms.py b/accounts/forms.py
index 92c523fc2..3cef588a7 100644
--- a/accounts/forms.py
+++ b/accounts/forms.py
@@ -1,6 +1,6 @@
from django import forms
-from django_registration.forms import RegistrationForm
from django_recaptcha.fields import ReCaptchaField
+from django_registration.forms import RegistrationForm
from accounts.models import User
diff --git a/accounts/templates/django_registration/registration_form.html b/accounts/templates/django_registration/registration_form.html
index 88dc09a9c..9a8d36939 100644
--- a/accounts/templates/django_registration/registration_form.html
+++ b/accounts/templates/django_registration/registration_form.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load crispy_forms_tags %}
+{% load honeypot %}
{% block content %}
Register
@@ -10,6 +11,9 @@ Register
{% else %}
{% endblock content %}
diff --git a/forms/tests.py b/forms/tests.py
index a39b155ac..2fac319e0 100644
--- a/forms/tests.py
+++ b/forms/tests.py
@@ -1 +1,29 @@
-# Create your tests here.
+from django.test import TestCase
+from django.conf import settings
+from wagtail.models import Page, Site
+
+from home.models import HomePage
+
+from .models import ContactFormPage
+
+
+class ContactFormPageHoneypotTest(TestCase):
+ def setUp(self) -> None:
+ site_root = Page.objects.get(id=2)
+
+ self.home_page = HomePage(title="Home")
+ site_root.add_child(instance=self.home_page)
+
+ Site.objects.all().update(root_page=self.home_page)
+ self.contact_form_page = ContactFormPage(
+ title="Contact Form Page",
+ slug="contact-form-page",
+ )
+ self.home_page.add_child(instance=self.contact_form_page)
+
+ def test_honeypot_field_is_rendered(self) -> None:
+ response = self.client.get(self.contact_form_page.url)
+ self.assertContains(
+ response,
+ settings.HONEYPOT_FIELD_NAME,
+ )
diff --git a/pyproject.toml b/pyproject.toml
index 0438ec39c..7d934fda4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -71,6 +71,7 @@ dependencies = [
"django-crispy-forms",
"django-extensions",
"django-flatpickr",
+ "django-honeypot",
"django-recaptcha",
"django-registration",
"django-storages",
diff --git a/requirements-dev.txt b/requirements-dev.txt
index f1bd36a27..205af0b40 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -54,6 +54,7 @@ django==4.2.7
# django-extensions
# django-filter
# django-flatpickr
+ # django-honeypot
# django-modelcluster
# django-permissionedforms
# django-recaptcha
@@ -81,6 +82,8 @@ django-filter==23.3
# via wagtail
django-flatpickr==2.0.1
# via Western-Friend-website (pyproject.toml)
+django-honeypot==1.0.4
+ # via Western-Friend-website (pyproject.toml)
django-modelcluster==6.1
# via wagtail
django-permissionedforms==0.1
diff --git a/requirements.txt b/requirements.txt
index 08795144b..452ca6488 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -41,6 +41,7 @@ django==4.2.7
# django-extensions
# django-filter
# django-flatpickr
+ # django-honeypot
# django-modelcluster
# django-permissionedforms
# django-recaptcha
@@ -64,6 +65,8 @@ django-filter==23.3
# via wagtail
django-flatpickr==2.0.1
# via Western-Friend-website (pyproject.toml)
+django-honeypot==1.0.4
+ # via Western-Friend-website (pyproject.toml)
django-modelcluster==6.1
# via wagtail
django-permissionedforms==0.1