project/scipycon/registration/views.py
branchpayments
changeset 276 325ec5a41269
parent 263 02593358eddc
parent 275 679a9cab4bf1
child 291 182b03a1e6fe
--- a/project/scipycon/registration/views.py	Thu Nov 18 14:18:33 2010 +0530
+++ b/project/scipycon/registration/views.py	Thu Nov 18 16:16:28 2010 +0530
@@ -58,7 +58,7 @@
 
     scope_entity = Event.objects.get(scope=scope)
 
-    reg = Registration.objects.get(pk=id)
+    reg = Registration.objects.get(pk=int(id))
     wifi = Wifi.objects.get(user=reg.registrant)
 
     # TODO: This is an ugly hack to add accommodation and payment forms
@@ -127,7 +127,8 @@
         wifi_form = WifiForm(initial={
             'user': wifi.user,
             'scope': wifi.scope,
-            'wifi': wifi.wifi
+            'wifi': wifi.wifi,
+            'registration_id': wifi.registration_id
             })
         acco_form = AccommodationForm(initial={
             'user': acco.user,
@@ -263,7 +264,7 @@
             acco = acco_form.save(registrant, scope_entity)
             payment = payment_form.save(registrant, scope_entity)
 
-            send_confirmation(registrant, scope_entity,password=passwd)
+            send_confirmation(registrant, scope_entity, password=passwd)
 
             redirect_to = reverse('scipycon_registrations',
                                   kwargs={'scope': scope})