aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/web.py
diff options
context:
space:
mode:
authorRémy HUBSCHER <hubscher.remy@gmail.com>2020-04-24 12:32:52 +0200
committerGitHub <noreply@github.com>2020-04-24 12:32:52 +0200
commit7587e292fb6b8322891636e785b63425778ab7c6 (patch)
tree4e77900e246f763c9c12b0824228559bd2720c44 /ihatemoney/web.py
parentabf1eea842284f6e147d9acf25a13c4e0c076e66 (diff)
downloadihatemoney-mirror-7587e292fb6b8322891636e785b63425778ab7c6.zip
ihatemoney-mirror-7587e292fb6b8322891636e785b63425778ab7c6.tar.gz
ihatemoney-mirror-7587e292fb6b8322891636e785b63425778ab7c6.tar.bz2
Remove obsolete python code (<3.6). (#571)
Diffstat (limited to 'ihatemoney/web.py')
-rw-r--r--ihatemoney/web.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/ihatemoney/web.py b/ihatemoney/web.py
index a12eae1..a2f25e2 100644
--- a/ihatemoney/web.py
+++ b/ihatemoney/web.py
@@ -301,9 +301,7 @@ def create_project():
project=g.project.name,
)
- message_body = render_template(
- "reminder_mail.%s.j2" % get_locale().language
- )
+ message_body = render_template(f"reminder_mail.{get_locale().language}.j2")
msg = Message(
message_title, body=message_body, recipients=[project.contact_email]
@@ -337,7 +335,7 @@ def remind_password():
# get the project
project = Project.query.get(form.id.data)
# send a link to reset the password
- password_reminder = "password_reminder.%s.j2" % get_locale().language
+ password_reminder = f"password_reminder.{get_locale().language}.j2"
current_app.mail.send(
Message(
"password recovery",
@@ -520,7 +518,7 @@ def export_project(file, format):
return send_file(
file2export,
- attachment_filename="%s-%s.%s" % (g.project.id, file, format),
+ attachment_filename=f"{g.project.id}-{file}.{format}",
as_attachment=True,
)
@@ -570,7 +568,7 @@ def invite():
# send the email
message_body = render_template(
- "invitation_mail.%s.j2" % get_locale().language
+ f"invitation_mail.{get_locale().language}.j2"
)
message_title = _(