sidorenkov

Answer #4

Aug 3rd, 2021
647
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. users = User.objects.all().select_related('groups')
  2. for u in Users:
  3.     print ([g.name for g in u.groups.all()])
RAW Paste Data