Commit 142624a6 by Bridger Maxwell

Added select_related to gradebook. Slight performance boost.

parent b65577f2
...@@ -294,7 +294,7 @@ def gradebook(request, course_id): ...@@ -294,7 +294,7 @@ def gradebook(request, course_id):
""" """
course = get_course_with_access(request.user, course_id, 'staff') course = get_course_with_access(request.user, course_id, 'staff')
enrolled_students = User.objects.filter(courseenrollment__course_id=course_id).order_by('username') enrolled_students = User.objects.filter(courseenrollment__course_id=course_id).order_by('username').select_related("profile")
# TODO (vshnayder): implement pagination. # TODO (vshnayder): implement pagination.
enrolled_students = enrolled_students[:1000] # HACK! enrolled_students = enrolled_students[:1000] # HACK!
......
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