From ae520fa765e0cc8286fedb164482c3fb67c75b2c Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 12 May 2015 02:14:17 +0200 Subject: [PATCH] add filters --- teleforma/admin.py | 3 ++- teleforma/models/crfpa.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/teleforma/admin.py b/teleforma/admin.py index eb57c8ad..e2d5ec47 100644 --- a/teleforma/admin.py +++ b/teleforma/admin.py @@ -67,7 +67,8 @@ class StudentAdmin(admin.ModelAdmin): 'trainings', 'iej', 'procedure', 'written_speciality', 'oral_speciality', 'oral_1', 'oral_2'] - list_display = ['student_name', 'total_payments', 'total_fees', 'balance'] + list_display = ['student_name', 'date_subscribed', 'platform_only', + 'total_payments', 'total_fees', 'balance'] actions = ['export_xls'] def student_name(self, instance): diff --git a/teleforma/models/crfpa.py b/teleforma/models/crfpa.py index 98f6e95a..55f27070 100644 --- a/teleforma/models/crfpa.py +++ b/teleforma/models/crfpa.py @@ -170,7 +170,7 @@ class Student(Model): db_table = app_label + '_' + 'student' verbose_name = _('Student') verbose_name_plural = _('Students') - ordering = ['user__last_name'] + ordering = ['user__last_name', '-date_subscribed'] class Profile(models.Model): -- 2.39.5