made neccesary changes to cancel python workshop. anoop
authoranoop
Thu, 29 Jul 2010 15:59:18 +0530
branchanoop
changeset 193 9b2a63bb8d16
parent 192 0968a6c0fb6a
child 194 b9e7742faa17
made neccesary changes to cancel python workshop.
sdi/events.py
sdi/views.py
templates/workshop_info.html
--- a/sdi/events.py	Thu Jul 29 11:56:26 2010 +0530
+++ b/sdi/events.py	Thu Jul 29 15:59:18 2010 +0530
@@ -37,6 +37,23 @@
 
     subject = "Sage Days 25, India - Python Workshop"
 
+    subject_cancellation = "Sage Days 25, India - Cancellation of Python Workshop"
+
+    message_cancellation = """
+Dear %s %s,
+
+We are sorry to announce that we are cancelling the one day Pre-Sage Days
+workshop which was scheduled on July 31st.
+
+It has been cancelled due to low response from the people who requested 
+for the workshop.
+
+Thanking you,
+
+Sage Days India Team,
+FOSSEE, IIT Bombay.
+    """%(user.first_name.title(), user.last_name.title(), user.id, user.email)
+
     message = """
 Dear %s %s,
 
@@ -69,7 +86,7 @@
 FOSSEE, IIT Bombay.
     """%(user.first_name.title(), user.last_name.title(), user.id, user.email)
 
-    send_mail(subject, message, "sagedays@fossee.in", [user.email])
+    send_mail(subject_cancellation, message_cancellation, "sagedays@fossee.in", [user.email])
 
 
 def send_sgd_ptc_confirm(user):
--- a/sdi/views.py	Thu Jul 29 11:56:26 2010 +0530
+++ b/sdi/views.py	Thu Jul 29 15:59:18 2010 +0530
@@ -206,37 +206,7 @@
 def confirm_wsp_participation(request, uid):
     """ 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
-
-    user_info = user.registrantinfo_set.all()[0]
-    status = user_info.status_of_attending_workshop
-    if status == "3":
-        return render_to_response("attending_wsp.html")
-    elif status != "2":
-        raise Http404
-
-    if request.method == "POST":
-        try:
-            has_laptop = request.POST['lap_status']
-        except MultiValueDictKeyError:
-            return render_to_response("cnf_wsp_ptc.html", {"user":user})
-
-        user_info.status_of_attending_workshop = "3"
-        user_info.has_laptop_for_workshop = True if has_laptop == "True" else False
-        user_info.save()
-
-        return render_to_response("attending_wsp.html")
-    else:
-        return render_to_response("cnf_wsp_ptc.html", {"user":user})
+    return render_to_response("workshop_info.html")
 
 def confirm_sgd_participation(request, uid):
     """ match id versus email and take lappy details.
--- a/templates/workshop_info.html	Thu Jul 29 11:56:26 2010 +0530
+++ b/templates/workshop_info.html	Thu Jul 29 15:59:18 2010 +0530
@@ -6,15 +6,10 @@
 <h3> Python Workshop </h3>
 <br />
 <br />
-Date: 31 July, 2010<br />
-Duration: 9:00 AM - 6:00 PM<br />
-Venue: CFD Lab, Aero Annex, Aero Space Department, IIT Bombay<br />
-<br />
-The workshop aims at getting people started with Python so that they can make most out of Sage Days.<br />
-The workshop is going to be a hands on and would be covering Python, Version Control and ReST.<br />
-<br />
-Please visit <a href="http://fossee.in/installation-how-to">Installation how-to</a> for instructions on installing the software that is used in the workshop, in your laptop.
-<br /><br />
-NOTE: Participants have to make their own arrangements for lunch.<br /><br />
+We are sorry to announce that we are cancelling the one day Pre-Sage Days
+workshop which was scheduled on July 31st.
+
+It has been cancelled due to low response from the people who requested 
+for the workshop.
 
 {% endblock %}