# HG changeset patch # User Madhusudan.C.S # Date 1291905394 -19800 # Node ID bd083c34aa43c70aa9b9f0c858c219b2dddddeb5 # Parent 781d7bc60cc9182b15e07f6f6144e6098e7fd0bc Update gender info on CSV. diff -r 781d7bc60cc9 -r bd083c34aa43 project/scipycon/registration/views.py --- a/project/scipycon/registration/views.py Thu Dec 09 20:04:51 2010 +0530 +++ b/project/scipycon/registration/views.py Thu Dec 09 20:06:34 2010 +0530 @@ -405,7 +405,7 @@ output = csv.writer(response) - output.writerow(['Name', 'City', + output.writerow(['Name', 'Gender', 'City', 'Registration Fees Paid', 'Attending Conference', 'Attending Tutorial', @@ -422,21 +422,24 @@ regs = Registration.objects.all() for reg in regs: row = [] - row.append('"%"' % reg.registrant.get_full_name()) - row.append(reg.city) + payment, create = reg.registrant.payment_set.get_or_create( user=reg.registrant, scope=reg.scope) + acco, created = reg.registrant.accommodation_set.get_or_create( + user=reg.registrant, scope=reg.scope) + wifi, create = reg.registrant.wifi_set.get_or_create( + user=reg.registrant, scope=reg.scope) + + row.append('"%"' % reg.registrant.get_full_name()) + row.append(acco.sex) + row.append(reg.city) row.append('Yes' if payment.confirmed else 'No') row.append('Yes' if reg.conference else 'No') row.append('Yes' if reg.tutorial else 'No') row.append('Yes' if reg.sprint else 'No') - wifi, create = reg.registrant.wifi_set.get_or_create( - user=reg.registrant, scope=reg.scope) row.append(wifi.registration_id) row.append('Yes' if payment.acco_confirmed else 'No') - acco, created = reg.registrant.accommodation_set.get_or_create( - user=reg.registrant, scope=reg.scope) row.append('Yes' if acco.accommodation_on_1st else 'No') row.append('Yes' if acco.accommodation_on_2nd else 'No') row.append('Yes' if acco.accommodation_on_3rd else 'No')