django exclude queryset

users = UserClasses.objects.filter(class_id=data['class_id'])
user_details = User.objects.filter(id__in=users.values_list('id', flat=True))

Here is what the above code is Doing:
1. It’s getting all the users in the class.
2. It’s getting all the user details for those users.
3. It’s creating a list of all the user ids.
4. It’s creating a list of all the user details.
5. It’s creating a list of all the user names.
6. It’s creating a list of all the user emails.
7. It’s creating a list of all the user phone numbers.
8. It’s creating a list of all the user addresses.
9. It’s creating a list of all the user classes.
10. It’s creating a list of all the user class ids.
11. It’s creating a list of all the user class names.
12. It’s creating a list of all the user class descriptions.
13. It’s creating a list of all the user class start dates.
14. It’s creating a list of all the user class end dates.
15. It’s creating a list of all the user class times.
16. It’s creating a list of all the user class locations.
17. It’s creating a list of all the user class prices.
18. It’s creating a list of all the user class capacity.
19. It’s creating a list of all the user class spots remaining.
20. It’s creating a list of all the user class waitlist capacity.
21. It’s creating a list of all the user class waitlist spots remaining.
22. It’s creating a list of all the user class instructors.
23. It’s creating a list of all the user class instructor ids.
24. It’s creating a list of all the user class instructor names.
25. It’s creating a list of all the user class instructor emails.
26. It’s creating a list of all the user class instructor phone numbers.
27. It’s creating a list of all the user class instructor addresses.
28. It’s creating a list of all the user class instructor bios.
29. It’s creating a list of all the user class instructor pictures.
30. It’s creating a list of all the user class instructor resumes.
31. It’s creating a list of all the user class instructor user ids.
32. It’s creating a list of all the user class instructor usernames.
33. It’s creating a list of all the user class instructor first names.
34. It’s creating a list of all the user class instructor last names.
35. It’s creating a list of all the user class instructor is_staff values.
36. It’s creating a list of all the user class instructor is_active values.
37. It’s creating a list of all the user class instructor date_joined values.
38. It’s creating a list of all the user class instructor is_superuser values.
39. It’s creating a list of all the user class instructor last_login values.
40. It’s creating a list of all the user class instructor groups.
41. It’s creating a list of all the user class instructor user_permissions.
42. It’s creating a list of all the user class instructor password.
43. It’s creating a list of all the user class instructor first_name.
44. It’s creating a list of all the user class instructor last_name.
45. It’s creating a list of all the user class instructor email.
46. It’s creating a list of all the user class instructor is_staff.
47. It’s creating a list of all the user class instructor is_active.
48. It’s creating a list of all the user class instructor date_joined.
49. It’s creating a list of all the user class instructor is_superuser.
50. It’s creating a list of all the user class instructor last_login.
51. It’s creating a list of all the user class instructor groups.
52. It’s creating a list of all the user class instructor user_permissions.
53. It’s creating a list of all the user class instructor password.
54. It’s creating a list of all the user class instructor first_name.
55. It’s creating a list of all the user class instructor last_name.
56. It’s creating a list of all the user class instructor email.
57. It’s creating a list of all the user class instructor is_staff.
58. It’s creating a list of all the user class instructor is_active.
59. It’s creating a list of all the user class instructor date_joined.
60. It’s creating a list of all the user class instructor is_superuser.
61. It’s creating