I have a list of users and an auth group called 'group1'. These users are created through the bulk_create
method in Django. Now I need to add all these users to group 'group1'.
I can achieve this with a for loop like:
group1 = Groups.objects.get(name='group1')
for user in users:
group1.user_set.add(user)
but I am wondering if there are any easy and better ways without using the for loop.