diff --git a/docs/parameterstore.md b/docs/parameterstore.md index 81bdd5e8e..b0423f9c4 100644 --- a/docs/parameterstore.md +++ b/docs/parameterstore.md @@ -15,3 +15,5 @@ AWS parameter store is used to store secrets and values that we then use to expo - `WDIV_API_KEY` - `FIREHOSE_ACCOUNT_ARN` - `AKISMET_API_KEY` +- `EMAIL_SIGNUP_EVENT_BRIDGE_ARN` - For mailing list signups. See the developer + handbook for values per account type diff --git a/requirements/base.txt b/requirements/base.txt index 7357250a3..dabcd24e5 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -15,7 +15,7 @@ redis==4.6.0 icalendar==5.0.7 dealer==2.1.0 -https://github.com/DemocracyClub/dc_signup_form/archive/refs/tags/2.2.0.tar.gz +https://github.com/DemocracyClub/dc_signup_form/archive/refs/tags/2.3.0.tar.gz https://github.com/DemocracyClub/design-system/archive/refs/tags/0.2.4.tar.gz https://github.com/DemocracyClub/dc_django_utils/archive/refs/tags/2.3.0.tar.gz git+https://github.com/DemocracyClub/dc_logging.git@0.0.9 diff --git a/wcivf/apps/mailing_list/urls.py b/wcivf/apps/mailing_list/urls.py index 77ff11063..a99b82517 100644 --- a/wcivf/apps/mailing_list/urls.py +++ b/wcivf/apps/mailing_list/urls.py @@ -14,6 +14,7 @@ template_name="base.html", form_class=MailingListSignupForm, backend=settings.EMAIL_SIGNUP_BACKEND, + backend_kwargs=settings.EMAIL_SIGNUP_BACKEND_KWARGS, ) ), name="mailing_list_signup_view", diff --git a/wcivf/settings/base.py b/wcivf/settings/base.py index ed47c89a3..18557b942 100644 --- a/wcivf/settings/base.py +++ b/wcivf/settings/base.py @@ -232,11 +232,11 @@ def repo_root(*x): ROBOTS_USE_HOST = False USE_X_FORWARDED_HOST = True -EMAIL_SIGNUP_ENDPOINT = ( - "https://democracyclub.org.uk/mailing_list/api_signup/v1/" -) -EMAIL_SIGNUP_API_KEY = os.environ.get("EMAIL_SIGNUP_API_KEY", "") -EMAIL_SIGNUP_BACKEND = "remote_db" +EMAIL_SIGNUP_BACKEND = "event_bridge" +EMAIL_SIGNUP_BACKEND_KWARGS = { + "source": "WCIVF", + "bus_arn": os.environ.get("EMAIL_SIGNUP_EVENT_BRIDGE_ARN"), +} # DC Base Theme settings SITE_TITLE = "Who Can I Vote For?"