def prof_index(request, sort='profID'): prof_add_in() # add Teacher to Prof2Lang template = 'group3/prof/prof_index.html' context = {} if sort == 'fullname': profList = Prof2Lang.objects.all().order_by('prefix_name', 'academic_position', 'firstName', 'lastName') else: profList = Prof2Lang.objects.all().order_by(sort) context['profList'] = profList return render( request, template, context )