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.
Adding user to a default group on creation
- Loading branch information
Chris Mann
committed
Nov 17, 2024
1 parent
0b9febc
commit 6e1bc25
Showing
2 changed files
with
10 additions
and
0 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
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,8 +1,17 @@ | ||
from allauth.account.signals import user_signed_up | ||
|
||
from .base import * | ||
|
||
|
||
DEBUG = False | ||
|
||
try: | ||
from .local import * | ||
except ImportError: | ||
pass | ||
|
||
|
||
@receiver(user_signed_up) | ||
def user_signed_up_callback(sender, request, user, **kargs): | ||
dashboard_user_group = Group.objects.get(name="dashboard") | ||
user.groups.add(dashboard_user_group) |