summaryrefslogtreecommitdiff
path: root/workshop_app/views.py
diff options
context:
space:
mode:
authorAkshen2017-06-01 16:06:04 +0530
committerAkshen2017-06-01 16:11:54 +0530
commit8e59e5ad6ff598f71168ec1a832a17ef9c52b8a3 (patch)
treebd42cc0390a4a9195491ff10ff399631ba6336aa /workshop_app/views.py
parent6237cbbfcb692a7003242f6e286be5cff3836194 (diff)
downloadworkshop_booking-8e59e5ad6ff598f71168ec1a832a17ef9c52b8a3.tar.gz
workshop_booking-8e59e5ad6ff598f71168ec1a832a17ef9c52b8a3.tar.bz2
workshop_booking-8e59e5ad6ff598f71168ec1a832a17ef9c52b8a3.zip
Changes URLS
- urls.py created in workshop_app - activation status logic changed, view_profile added
Diffstat (limited to 'workshop_app/views.py')
-rw-r--r--workshop_app/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/workshop_app/views.py b/workshop_app/views.py
index 0557207..0efaf54 100644
--- a/workshop_app/views.py
+++ b/workshop_app/views.py
@@ -99,9 +99,9 @@ def activate_user(request, key):
return redirect('/register/')
if user.is_email_verified:
- status = "Your email is already verified"
+ status = "2"
elif timezone.now() > user.key_expiry_time:
- status = "Your activation has expired please register again"
+ status = "1"
Profile.objects.get(user_id=user.user_id).delete()
User.objects.get(id=user.user_id).delete()
return render(request, 'workshop_app/activation.html',
@@ -109,7 +109,7 @@ def activate_user(request, key):
elif key == user.activation_key:
user.is_email_verified = True
user.save()
- status = "Your account has been activated"
+ status = "0"
else:
logout(request)
return redirect('/logout/')