from django.contrib.auth.models import Group, User

new_user = User(username="foo", password="bar")

example_group = Group.objects.get(name="<GROUP_NAME>")
example_group.user_set.add(new_user)