reset user password and ssh pk implement

This commit is contained in:
xiaokong1937@gmail.com
2016-09-13 21:45:10 +08:00
parent 00502ce33d
commit 6751c5a63a
10 changed files with 876 additions and 37 deletions

View File

@@ -5,6 +5,7 @@ import logging
import os
import re
from django.conf import settings
from django.contrib.auth.mixins import UserPassesTestMixin
from django.urls import reverse_lazy
from django.utils.translation import ugettext as _
@@ -121,6 +122,8 @@ def send_reset_password_mail(user):
'email': user.email,
'login_url': reverse('users:login', external=True),
}
if settings.DEBUG:
logger.debug(message)
send_mail_async.delay(subject, message, recipient_list, html_message=message)