From a2bc5de2058742b067223b25f368e196a5b46475 Mon Sep 17 00:00:00 2001 From: Keith Smith Date: Mon, 31 Aug 2026 16:55:17 -0600 Subject: [PATCH] Default task sort to due date instead of raw model order The "Default" option cleared the sort param and fell back to the model's Meta.ordering (sort_order, -priority, due_date, created_at), which read as broken/unsorted to users. Default is now due date (earliest first), matching the existing due_date sort option. Co-Authored-By: Claude Sonnet 5 --- tasks/views.py | 2 +- templates/tasks/dashboard.html | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tasks/views.py b/tasks/views.py index 54af7dc..af651cd 100644 --- a/tasks/views.py +++ b/tasks/views.py @@ -232,7 +232,7 @@ class DashboardView(View): current_filter = request.GET.get('filter', 'all') current_tag_id = request.GET.get('tag') selected_task_id = request.GET.get('selected') - current_sort = request.GET.get('sort', 'default') + current_sort = request.GET.get('sort', 'due_date') # Base query tasks = Task.objects.filter( diff --git a/templates/tasks/dashboard.html b/templates/tasks/dashboard.html index d02daa3..4d65c61 100644 --- a/templates/tasks/dashboard.html +++ b/templates/tasks/dashboard.html @@ -9,7 +9,6 @@
{{ tasks|length }} task{{ tasks|length|pluralize }}