From b5899bc56a64bc258e44d23d22c368758aec2da0 Mon Sep 17 00:00:00 2001 From: Ethan Nguyen Date: Tue, 20 Apr 2021 22:32:05 -0400 Subject: [PATCH] feat(destinations): show defer-waitlist counts --- tjdests/apps/destinations/views.py | 14 ++++++++++++++ tjdests/templates/destinations/college_list.html | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/tjdests/apps/destinations/views.py b/tjdests/apps/destinations/views.py index c49aed3..19c76cb 100644 --- a/tjdests/apps/destinations/views.py +++ b/tjdests/apps/destinations/views.py @@ -125,6 +125,20 @@ class CollegeDestinationListView( decision__user__publish_data=True, ), ), + count_defer_wl_admit=Count( + "decision", + filter=Q( + decision__admission_status=Decision.DEFER_WL_A, + decision__user__publish_data=True, + ), + ), + count_defer_wl_deny=Count( + "decision", + filter=Q( + decision__admission_status=Decision.DEFER_WL_D, + decision__user__publish_data=True, + ), + ), count_deny=Count( "decision", filter=Q( diff --git a/tjdests/templates/destinations/college_list.html b/tjdests/templates/destinations/college_list.html index 7c9c919..86bbd08 100644 --- a/tjdests/templates/destinations/college_list.html +++ b/tjdests/templates/destinations/college_list.html @@ -40,6 +40,8 @@ Deferred Deferred-Admitted Deferred-Denied + Deferred-Waitlisted-Admitted + Deferred-Waitlisted-Denied Denied @@ -55,6 +57,8 @@ {{ college.count_defer }} {{ college.count_defer_admit }} {{ college.count_defer_deny }} + {{ college.count_defer_wl_admit }} + {{ college.count_defer_wl_deny }} {{ college.count_deny }} {% empty %} @@ -68,6 +72,8 @@ + + {% endfor %}