[Answered ]-How do I set a default group with django-authopenid?

2👍

On models.py you could bind the post_save signal:

from django.contrib.auth.models import User, Group
from django.db.models.signals import post_save


def default_group(sender, instance, created, **kwargs):
    if created:
        instance.groups.add(Group.objects.get(name='your default group name'))
post_save.connect(default_group, sender=User)

If in doubt, read the signals documentation.

👤jpic

Leave a comment