From 0edfdc877f09b0df9001bd9600a546c2979db89a Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 Sep 2019 18:43:29 +0200 Subject: [PATCH] Quick fix --- templates/base.html | 2 +- users/views.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/templates/base.html b/templates/base.html index f745296..0a35f61 100644 --- a/templates/base.html +++ b/templates/base.html @@ -61,7 +61,7 @@ {% endif %} - + diff --git a/users/views.py b/users/views.py index 8d437a5..76b4227 100644 --- a/users/views.py +++ b/users/views.py @@ -188,18 +188,16 @@ def createUser(request): email = EmailMultiAlternatives( "Bienvenue à l'association Coopé Technopôle Metz", text_content, - "Coopé Technopôle Metz ", + "Coopé Technopôle Metz ", [user.email], reply_to=["coopemetz@gmail.com"] ) email.attach_alternative(html_content, "text/html") gp,_ = GeneralPreferences.objects.get_or_create(pk=1) if gp.statutes: - #email.attach("statuts.pdf", gp.statutes.read(), "application/pdf") - pass + email.attach("statuts.pdf", gp.statutes.read(), "application/pdf") if gp.rules: - #email.attach("ri.pdf", gp.rules.read(), "application/pdf") - pass + email.attach("ri.pdf", gp.rules.read(), "application/pdf") email.send() messages.success(request, "L'utilisateur a bien été créé") return redirect(reverse('users:profile', kwargs={'pk':user.pk}))