]> git.parisson.com Git - teleforma.git/commitdiff
ordering contacts
authoryomguy <yomguy@parisson.com>
Tue, 10 Jul 2012 14:11:28 +0000 (16:11 +0200)
committeryomguy <yomguy@parisson.com>
Tue, 10 Jul 2012 14:11:28 +0000 (16:11 +0200)
teleforma/templatetags/teleforma_tags.py
teleforma/views.py

index 4a009f3cae047019be5e9df04d7d0f15986b590a..2737a9d16d82569ff7da53e966a5d990e1d86c4f 100644 (file)
@@ -142,11 +142,11 @@ def from_doc_type(docs, type):
 
 @register.assignment_tag
 def get_all_professors():
-    return Professor.objects.all()
+    return Professor.objects.all().order_by('user')
 
 @register.assignment_tag
 def get_all_admins():
-    return User.objects.filter(is_superuser=True)
+    return User.objects.filter(is_superuser=True).order_by('first_name')
 
 @register.assignment_tag
 def get_all_trainings():
index 96f5ffd2cd68db5f640254dca69478068fe113ec..4b6ea316a07793cc1158f7a4550534e24c79a5e5 100755 (executable)
@@ -244,6 +244,7 @@ class MediaView(DetailView):
         else:
             return redirect('teleforma-media-detail', media.id)
 
+
 class DocumentView(DetailView):
 
     model = Document