Add ordering for names on the CSV list.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Sat, 11 Dec 2010 17:31:35 +0530
changeset 365 9fb175da83a5
parent 364 7d3cb6c7a22f
child 366 a52775d210e3
Add ordering for names on the CSV list.
project/scipycon/registration/views.py
--- a/project/scipycon/registration/views.py	Sat Dec 11 14:44:37 2010 +0530
+++ b/project/scipycon/registration/views.py	Sat Dec 11 17:31:35 2010 +0530
@@ -419,7 +419,8 @@
                      'Accommodation on 16th night',
                      'Accommodation on 17th night'])
 
-    regs = Registration.objects.all()
+    regs = Registration.objects.order_by(
+      'registrant__first_name', 'registrant__last_name')
     for reg in regs:
         row = []