# HG changeset patch # User nishanth # Date 1279185682 -19800 # Node ID fdaed2cf58208d488c2f7e630feb8c72752a005b # Parent e6140a4cac5d7e7922e21b4f4627e5f7ac9b94b4 improvised the view diff -r e6140a4cac5d -r fdaed2cf5820 sdi/views.py --- 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):