--- a/sdi/views.py Thu Jul 15 14:36:23 2010 +0530
+++ b/sdi/views.py Thu Jul 15 14:51:22 2010 +0530
@@ -129,19 +129,25 @@
""" match id versus email and take lappy details.
"""
+ try:
+ email = request.GET['email']
+ except MultiValueDictKeyError:
+ raise Http404
+
+ try:
+ user = Registrant.objects.get(id=uid, email=email)
+ except Registrant.DoesNotExist:
+ raise Http404
+
+ status = user.registrationinfo.status_of_attending_workshop
+ if status == "3":
+ return render_to_response("attending_wsp.html")
+ elif status != "2":
+ raise Http404
+
if request.method == "POST":
pass
else:
- try:
- email = request.GET['email']
- except MultiValueDictKeyError:
- raise Http404
-
- try:
- Registrant.objects.get(id=uid, email=email)
- except Registrant.DoesNotExist:
- raise Http404
-
return render_to_response("cnf_wsp_ptc.html", {"email":email})
def admin_login(request):