Skip to content

Django Auth app

django-auth-tables.png

Add a user to a Group

from django.contrib.auth.models import Group
my_group = Group.objects.get(name='my_group_name')

my_group.user_set.add(your_user)

Last update: 2022-11-04