Add sorting of student projects on organization home page.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Thu, 21 May 2009 14:44:41 +0200
changeset 2331 91379f6b8fcb
parent 2330 068540d91bde
child 2332 2a6071255146
Add sorting of student projects on organization home page. List of student projects on organization home page is now sorted in alphabetical order by student name. Fixes issue 613.
app/soc/views/models/organization.py
--- a/app/soc/views/models/organization.py	Thu May 21 13:25:11 2009 +0200
+++ b/app/soc/views/models/organization.py	Thu May 21 14:44:41 2009 +0200
@@ -554,6 +554,8 @@
       ap_list = lists.getListContent(request, ap_params, filter, idx=0,
                                      need_content=True)
 
+      ap_list['data'].sort(key=lambda sp: sp.student.name().lower())
+      
       contents = []
 
       if ap_list: