Skip to content

Commit

Permalink
Trying a new callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Mann committed Nov 17, 2024
1 parent 6ba36ac commit b8f1ed5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lesgrandsvoisins/apps.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
from allauth.account.signals import user_signed_up
from django.apps import AppConfig
from django.contrib.auth.models import Group


def user_signed_up_callback(sender, request, user, **kargs):
dashboard_user_group = Group.objects.get(name="dashboard")
user.groups.add(dashboard_user_group)
# from allauth.account.signals import user_signed_up
# from django.contrib.auth.models import Group


# def user_signed_up_callback(sender, request, user, **kargs):
# dashboard_user_group = Group.objects.get(name="dashboard")
# user.groups.add(dashboard_user_group)


class LesGrandsVoisinsConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "lesgrandsvoisins"

def ready(self):
user_signed_up.connect(user_signed_up_callback)
# def ready(self):
# user_signed_up.connect(user_signed_up_callback)

0 comments on commit b8f1ed5

Please sign in to comment.