Added submission_id to email context
ci/woodpecker/push/build Pipeline was successful Szczegóły
ci/woodpecker/tag/build Pipeline was successful Szczegóły

pull/21/head 0.4.2
mtyton 2023-11-05 20:03:03 +01:00
rodzic dd0998b96b
commit 19078bd03f
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -59,7 +59,7 @@ class Form(FormMixin, Page):
class EmailFormSubmission(AbstractFormSubmission):
def send_mail(self, data):
# modify this, get proper template
to_addresses = data.pop("to_address").split(",")
@ -77,7 +77,7 @@ class EmailFormSubmission(AbstractFormSubmission):
template_name="form_mail",
recipient=address,
sender=from_address,
context={"form_data": data},
context={"form_data": data, "submission_id": self.id},
attachments=attachments
)