♻️ Refactor logic to allow running pytest tests locally (#683)
This commit is contained in:

committed by
GitHub

parent
64e21bb0d5
commit
4e2c6bd6ba
@@ -18,7 +18,9 @@ class EmailData:
|
||||
|
||||
|
||||
def render_email_template(*, template_name: str, context: dict[str, Any]) -> str:
|
||||
template_str = (Path(settings.EMAIL_TEMPLATES_DIR) / template_name).read_text()
|
||||
template_str = (
|
||||
Path(__file__).parent / "email-templates" / "build" / template_name
|
||||
).read_text()
|
||||
html_content = Template(template_str).render(context)
|
||||
return html_content
|
||||
|
||||
|
Reference in New Issue
Block a user