Skip to content

Commit

Permalink
Ch(password reset)Reset link
Browse files Browse the repository at this point in the history
- update the email link
Maintains[#166024480]
  • Loading branch information
dorothyas committed May 16, 2019
1 parent 6e24940 commit 578f294
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions authors/apps/authentication/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ def post(self, request):
user = User.objects.filter(email=user_email).first()
if user:
token = user._generate_jwt_token()
url = get_current_site(request).domain + reverse('password-change',kwargs={'token':token})
url = settings.BASE_URL
send_email = EmailMessage(
subject='Authors Haven:Password Reset',
body='Click here to reset your password http://{}'.format(url),
body='Click here to reset your password {}{}/change/'.format(url, token),
from_email= settings.EMAIL_HOST_USER,
to=[user.email]
to=[user.email]
)
send_email.send(fail_silently=False)
return Response({'message':'Password reset link has been sent to your Email'},
Expand Down
3 changes: 2 additions & 1 deletion authors/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,5 @@
WORD_LENGTH = config('WORD_LENGTH')
WORD_PER_MINUTE = config('WORD_PER_MINUTE')

BASE_ARTICLE_SHARE_URL= config('BASE_ARTICLE_SHARE_URL', False)
BASE_ARTICLE_SHARE_URL = config('BASE_ARTICLE_SHARE_URL', False)
BASE_URL = config('BASE_URL')

0 comments on commit 578f294

Please sign in to comment.