Made adjustments in the view to make paid field a dummy form field and not a model field. Also added confirmed field as model field. payments
authorMadhusudan.C.S <madhusudancs@gmail.com>
Tue, 16 Nov 2010 17:37:36 +0530
branchpayments
changeset 263 02593358eddc
parent 262 b7c39720475a
child 264 f80e1c78dcc0
Made adjustments in the view to make paid field a dummy form field and not a model field. Also added confirmed field as model field.
project/scipycon/registration/views.py
--- a/project/scipycon/registration/views.py	Tue Nov 16 17:36:53 2010 +0530
+++ b/project/scipycon/registration/views.py	Tue Nov 16 17:37:36 2010 +0530
@@ -139,7 +139,7 @@
         payment_form = PaymentForm(initial={
             'user': payment.user,
             'scope': payment.scope,
-            'paid': payment.paid,
+            'paid': payment.type or payment.details,
             'type': payment.type,
             'details': payment.details,
             })
@@ -348,7 +348,7 @@
                 payment, created = reg_user.payment_set.get_or_create(
                   user=reg_user, scope=scope_entity)
 
-                payment.paid = True
+                payment.confirmed = True
                 payment.save()
 
                 list_user_ids.append(id)
@@ -361,7 +361,7 @@
         for user in unpaid_users:
             payment, created = user.payment_set.get_or_create(
               user=user, scope=scope_entity)
-            payment.paid = False
+            payment.confirmed = False
             payment.save()
 
     registrants = Registration.objects.all()