Commit f14b2661 authored by Cornee Traas's avatar Cornee Traas
Browse files

Update resetpassword url

parent b185da49
......@@ -61,7 +61,7 @@ class UserSerializer(serializers.ModelSerializer):
)
email_message = EmailMultiAlternatives(
subject, body, from_email="noreply@dashit.win.tue.nl", to=[user.email]
subject, body, from_email=settings.DEFAULT_FROM_EMAIL, to=[user.email]
)
email_message.send()
......
......@@ -4,4 +4,4 @@ An account has been created for DASH-IT.
You can set a password to activate you account at the following link:
<a href="{{domain}}resetpassword/{{token}}/{{user.pk}}">Click here to activate your account</a>
<a href="{{domain}}pages/resetpassword/{{token}}/{{user.pk}}">Click here to activate your account</a>
......@@ -67,7 +67,7 @@ class UserViewSet(ModelViewSet):
token = default_token_generator.make_token(user)
link = (
settings.FRONTEND_URL
+ "resetpassword/"
+ "pages/resetpassword/"
+ str(token)
+ "/"
+ str(user.pk)
......@@ -77,7 +77,7 @@ class UserViewSet(ModelViewSet):
'<html><body><a href="'
+ link
+ '"> Click here to reset your password</a></body></html>',
"noreply@" + request.get_host(),
settings.DEFAULT_FROM_EMAIL,
[user.email],
)
except User.DoesNotExist as e:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment