some login fix
This commit is contained in:
parent
41f81b1468
commit
764911df7c
@ -261,7 +261,10 @@ def UserRegisterAPIView(request):
|
|||||||
@api_view(['POST'])
|
@api_view(['POST'])
|
||||||
@permission_classes([permissions.AllowAny])
|
@permission_classes([permissions.AllowAny])
|
||||||
def UserActivationAPIView(request, uidb64, token):
|
def UserActivationAPIView(request, uidb64, token):
|
||||||
|
try:
|
||||||
uid = force_text(urlsafe_base64_decode(uidb64))
|
uid = force_text(urlsafe_base64_decode(uidb64))
|
||||||
|
except:
|
||||||
|
return Response({'ok':False, 'error':'Invalid activation link'}, status = status.HTTP_400_BAD_REQUEST)
|
||||||
user = User.objects.filter(id = uid)
|
user = User.objects.filter(id = uid)
|
||||||
if(user.exists()):
|
if(user.exists()):
|
||||||
user = user.first()
|
user = user.first()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% autoescape off %}
|
{% autoescape off %}
|
||||||
<h1>HI {{ user.username }}</h1>
|
<h1>HI {{ user.username }}</h1>
|
||||||
<h2>Please click on the link to confirm your registration:</h2>
|
<h2>Please click on the link to confirm your registration:</h2>
|
||||||
<a href="http://{{ domain }}/activate/{{ uidb64 }}/{{ token }}"><h2>Confirm Email</h2></a>
|
<a href="http://{{ domain }}:8888/activate/?uidb={{ uidb64 }}&token={{ token }}"><h2>Confirm Email</h2></a>
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
@ -2,5 +2,5 @@
|
|||||||
<h1>HI {{ user.username }}</h1>
|
<h1>HI {{ user.username }}</h1>
|
||||||
<h2>This email was used to reset your account password</h2>
|
<h2>This email was used to reset your account password</h2>
|
||||||
<h2>To reset password follow the link below:</h2>
|
<h2>To reset password follow the link below:</h2>
|
||||||
<a href="http://{{ domain }}/reset_pass/{{ uidb64 }}/{{ token }}"><h2>Reset Password</h2></a>
|
<a href="http://{{ domain }}:8888/reset_pass/{{ uidb64 }}/{{ token }}"><h2>Reset Password</h2></a>
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
7457
front/package-lock.json
generated
Normal file
7457
front/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user