Compatibilité django 1.11 sur les renders
This commit is contained in:
parent
419154caac
commit
f85829e69c
|
@ -70,7 +70,7 @@ def password_change_action(u_form, user, request, req=False):
|
|||
def reset_passwd_mail(req, request):
|
||||
""" Prend en argument un request, envoie un mail de réinitialisation de mot de pass """
|
||||
t = loader.get_template('users/email_passwd_request')
|
||||
c = Context({
|
||||
c = {
|
||||
'name': str(req.user.name) + ' ' + str(req.user.surname),
|
||||
'asso': ASSO_NAME,
|
||||
'asso_mail': ASSO_EMAIL,
|
||||
|
@ -78,7 +78,7 @@ def reset_passwd_mail(req, request):
|
|||
'url': request.build_absolute_uri(
|
||||
reverse('users:process', kwargs={'token': req.token})),
|
||||
'expire_in': REQ_EXPIRE_STR,
|
||||
})
|
||||
}
|
||||
send_mail('Votre compte %s' % SITE_NAME, t.render(c),
|
||||
EMAIL_FROM, [req.user.email], fail_silently=False)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue