3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-05 01:16:28 +00:00

Quick fix

This commit is contained in:
root 2019-09-23 18:43:29 +02:00
parent f2c6ae8ab0
commit 0edfdc877f
2 changed files with 4 additions and 6 deletions

View file

@ -61,7 +61,7 @@
</script>
{% endif %}
<script src="{% static 'dropdown.js' %}"></script>
<script src="{% static 'js/jquery.min.js' %}"></script>
<!--<script src="{% static 'js/jquery.min.js' %}"></script>-->
<script src="{% static 'js/jquery.scrollex.min.js' %}"></script>
<script src="{% static 'js/jquery.scrolly.min.js' %}"></script>
<script src="{% static 'js/browser.min.js' %}"></script>

View file

@ -188,18 +188,16 @@ def createUser(request):
email = EmailMultiAlternatives(
"Bienvenue à l'association Coopé Technopôle Metz",
text_content,
"Coopé Technopôle Metz <no-reply@coope.rezometz.org>",
"Coopé Technopôle Metz <no-reply-coope@rezometz.org>",
[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}))