Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#166024480 Update Password Reset link #39

Merged
merged 1 commit into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')