diff options
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) |