Skip to content

Commit

Permalink
Use DC Signup Form EventBridge backend
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Sep 20, 2023
1 parent 1c15734 commit fc4fff0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/parameterstore.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down
1 change: 1 addition & 0 deletions wcivf/apps/mailing_list/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions wcivf/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?"
Expand Down

0 comments on commit fc4fff0

Please sign in to comment.