MCPcopy Create free account
hub / github.com/codemistic/Web-Development / verify

Function verify

email verification/src/accounts/views.py:89–105  ·  view source on GitHub ↗
(request,auth_token)

Source from the content-addressed store, hash-verified

87 return render(request,'token_send.html')
88
89def verify(request,auth_token):
90 try:
91 profile_obj = Profile.objects.filter(auth_token = auth_token).first()
92 if profile_obj:
93 if profile_obj.is_verified:
94 messages.success(request,'account already verified.')
95 return redirect('/login')
96
97 profile_obj.is_verified = True
98 profile_obj.save()
99 messages.success(request,'account verified.')
100 return redirect('/login')
101 else:
102 return redirect('/error')
103 except Exception as e:
104 print(e)
105 return redirect('/')
106
107
108def send_mail_after_registration(email , token):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected