sorted course by course code

parent b78e01f0
...@@ -5,7 +5,7 @@ from django.http import Http404 ...@@ -5,7 +5,7 @@ from django.http import Http404
def ListView_view(request, *args, **kwargs): def ListView_view(request, *args, **kwargs):
list_context = { list_context = {
"all_courses": Course.objects.all() "all_courses": Course.objects.all().order_by('code')
} }
return render(request, "assignments/ListView.html", list_context) return render(request, "assignments/ListView.html", list_context)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment