Reset hesla, doplneni mailu

This commit is contained in:
Michal Kváček
2024-02-08 16:26:12 +01:00
parent 03c9f2d189
commit c26eb97288
11 changed files with 235 additions and 79 deletions
+9 -6
View File
@@ -30,9 +30,9 @@ class ContactFormEmail(Email):
class WelcomeEmail(Email):
def __init__(self, to: list[EmailStr | str]):
def __init__(self, to: EmailStr | str):
super().__init__(
to=to,
to=[to],
subject="Vítej",
template="welcome.html",
template_variables={}
@@ -40,10 +40,13 @@ class WelcomeEmail(Email):
class ResetPasswordEmail(Email):
def __init__(self, to: list[EmailStr | str], template_variables: dict):
def __init__(self, to: EmailStr | str, reset_token: str, validity_hours: int):
super().__init__(
to=to,
subject="Reset hesla",
to=[to],
subject="Žádost o reset",
template="reset_password.html",
template_variables=template_variables
template_variables={
"token": reset_token,
"validity_hours": validity_hours,
}
)