(request,auth_token)
| 87 | return render(request,'token_send.html') |
| 88 | |
| 89 | def 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 | |
| 108 | def send_mail_after_registration(email , token): |
nothing calls this directly
no outgoing calls
no test coverage detected