From da2d146f0bccc99c10e8b02606cf1c1503a619fd Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 21 Mar 2021 12:07:58 -0700 Subject: [PATCH] runs black for python formatting --- bookwyrm/emailing.py | 5 +++-- bookwyrm/views/site.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bookwyrm/emailing.py b/bookwyrm/emailing.py index e58423e82..47ac59df5 100644 --- a/bookwyrm/emailing.py +++ b/bookwyrm/emailing.py @@ -11,9 +11,9 @@ def email_data(): """ fields every email needs """ site = models.SiteSettings.objects.get() if site.logo_small: - logo_path = '/images/{}'.format(site.logo_small.url) + logo_path = "/images/{}".format(site.logo_small.url) else: - logo_path = '/static/images/logo-small.png' + logo_path = "/static/images/logo-small.png" return { "site_name": site.name, @@ -37,6 +37,7 @@ def password_reset_email(reset_code): data["user"] = reset_code.user.display_name send_email.delay(reset_code.user.email, *format_email("password_reset", data)) + def format_email(email_name, data): """ render the email templates """ subject = ( diff --git a/bookwyrm/views/site.py b/bookwyrm/views/site.py index 5b33b92a7..e58976607 100644 --- a/bookwyrm/views/site.py +++ b/bookwyrm/views/site.py @@ -39,7 +39,7 @@ class Site(View): @permission_required("bookwyrm.edit_instance_settings", raise_exception=True) def email_preview(request): """ for development, renders and example email template """ - template = request.GET.get('email') + template = request.GET.get("email") data = emailing.email_data() data["subject_path"] = "email/{}/subject.html".format(template) data["html_content_path"] = "email/{}/html_content.html".format(template)