changed all_courses list type into QuerySet

parent 27571614
...@@ -4,7 +4,7 @@ from .models import Assignment, Course ...@@ -4,7 +4,7 @@ from .models import Assignment, Course
def ListView_view(request, *args, **kwargs): def ListView_view(request, *args, **kwargs):
list_context = { list_context = {
"all_courses": [obj for obj in Course.objects.all()] "all_courses": Course.objects.all()
} }
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