forked from numerique-gouv/sites-faciles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chris Mann
committed
Nov 17, 2024
1 parent
6ba36ac
commit b8f1ed5
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |