diff options
author | Akshen | 2017-10-31 11:15:41 +0530 |
---|---|---|
committer | Akshen | 2017-10-31 16:59:51 +0530 |
commit | ae78048a1f978a6a570faeb10ecb77229460eae1 (patch) | |
tree | 34e334d5032e6e76272018f451ab41c9c7311927 /yaksh | |
parent | 840c00b9e939d2b33058d236ef4170923e0a018b (diff) | |
download | online_test-ae78048a1f978a6a570faeb10ecb77229460eae1.tar.gz online_test-ae78048a1f978a6a570faeb10ecb77229460eae1.tar.bz2 online_test-ae78048a1f978a6a570faeb10ecb77229460eae1.zip |
Fix Course Ordering in Courses Page
Latest Course will be shown on Top in Courses Page
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/views.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index b4cb844..47d8c9f 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -792,8 +792,10 @@ def courses(request): ci = RequestContext(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) - allotted_courses = Course.objects.filter(teachers=user, is_trial=False) + courses = Course.objects.filter( + creator=user, is_trial=False).order_by('-id') + allotted_courses = Course.objects.filter( + teachers=user, is_trial=False).order_by('-id') context = {'courses': courses, "allotted_courses": allotted_courses} return my_render_to_response('yaksh/courses.html', context, context_instance=ci) |