Skip to content
Snippets Groups Projects
Commit 0b208632 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Replace feedback send_mail_with_template with send_templated_mail

parent d4e0a370
No related branches found
No related tags found
1 merge request!13Resolve "Replace send_mail_with_template"
......@@ -154,22 +154,15 @@ def feedback(request):
# Send mail
context = {
"design": design_rating,
"performance": performance_rating,
"usability": usability_rating,
"overall": overall_rating,
"more": more,
"apps": apps,
"ideas": ideas,
"description": [design_rating, performance_rating, usability_rating, overall_rating, more, apps, ideas],
"user": request.user,
"type": _("Feedback"),
}
send_mail_with_template(
_(f"Feedback from {request.user.username}"),
[config.MAIL_FEEDBACK],
"hjelp/mail/feedback.txt",
"hjelp/mail/feedback.html",
context,
f"{request.user.get_full_name()} <{request.user.email}>",
send_templated_mail(
template_name="hjelp",
from_email=f"{request.user.get_full_name()} <{request.user.email}>",
recipient_list=[config.MAIL_FEEDBACK],
context=context,
)
return render(request, "hjelp/feedback_submitted.html")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment