From 52afb684b1bd59cc1d5f2f1a6963b877a5604b37 Mon Sep 17 00:00:00 2001 From: Akshen Date: Mon, 6 Nov 2017 15:45:21 +0530 Subject: Show Latest Active Course on top of Courses Page --- yaksh/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'yaksh/views.py') diff --git a/yaksh/views.py b/yaksh/views.py index 0d6acfe..e2412bb 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -793,9 +793,9 @@ def courses(request): if not is_moderator(user): raise Http404('You are not allowed to view this page') courses = Course.objects.filter( - creator=user, is_trial=False).order_by('-active') + creator=user, is_trial=False).order_by('-active', '-id') allotted_courses = Course.objects.filter( - teachers=user, is_trial=False).order_by('-active') + teachers=user, is_trial=False).order_by('-active', '-id') context = {'courses': courses, "allotted_courses": allotted_courses} return my_render_to_response('yaksh/courses.html', context, context_instance=ci) -- cgit