election_day.views.subscription

Functions

subscribe_email(→ onegov.core.types.RenderData)

Initiate the email notification subscription.

optin_email(→ onegov.core.types.RenderData)

Confirm the email used for the subscription.

unsubscribe_email(→ onegov.core.types.RenderData)

Initiates the email notification unsubscription.

optout_email(→ RenderData | Response)

Deactivates the email subscription.

subscribe_sms(→ onegov.core.types.RenderData)

Adds the given phone number to the SMS subscribers.

unsubscribe_sms(→ onegov.core.types.RenderData)

Removes the given phone number from the SMS subscribers.

Module Contents

election_day.views.subscription.subscribe_email(self: onegov.election_day.models.Principal, request: onegov.election_day.request.ElectionDayRequest, form: onegov.election_day.forms.EmailSubscriptionForm) onegov.core.types.RenderData[source]

Initiate the email notification subscription.

election_day.views.subscription.optin_email(self: onegov.election_day.models.Principal, request: onegov.election_day.request.ElectionDayRequest, form: onegov.election_day.forms.EmailSubscriptionForm) onegov.core.types.RenderData[source]

Confirm the email used for the subscription.

election_day.views.subscription.unsubscribe_email(self: onegov.election_day.models.Principal, request: onegov.election_day.request.ElectionDayRequest, form: onegov.election_day.forms.EmailSubscriptionForm) onegov.core.types.RenderData[source]

Initiates the email notification unsubscription.

election_day.views.subscription.optout_email(self: onegov.election_day.models.Principal, request: onegov.election_day.request.ElectionDayRequest, form: onegov.election_day.forms.EmailSubscriptionForm) RenderData | Response[source]

Deactivates the email subscription.

Allows one-click unsubscription as defined by RFC-8058:

curl -X POST http://localhost:8080/xx/zg/unsubscribe-email?opaque=yy

election_day.views.subscription.subscribe_sms(self: onegov.election_day.models.Principal, request: onegov.election_day.request.ElectionDayRequest, form: onegov.election_day.forms.SmsSubscriptionForm) onegov.core.types.RenderData[source]

Adds the given phone number to the SMS subscribers.

election_day.views.subscription.unsubscribe_sms(self: onegov.election_day.models.Principal, request: onegov.election_day.request.ElectionDayRequest, form: onegov.election_day.forms.SmsSubscriptionForm) onegov.core.types.RenderData[source]

Removes the given phone number from the SMS subscribers.