Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added start of request receivers adding account_user_signed_up
- Loading branch information
Showing
9 changed files
with
41 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
def email_confirmed(sender, user, **kwargs): | ||
request = sender | ||
|
||
# mark user as active | ||
user = kwargs.get("email_address").user | ||
user.is_active = True | ||
user.save() |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import django.dispatch | ||
|
||
|
||
|
||
account_user_signed_up = django.dispatch.Signal(providing_args=["user"]) |
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
Empty file.
7 changes: 7 additions & 0 deletions
7
pinax/projects/social_project/apps/request_receivers/models.py
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from account import signals | ||
|
||
from request_receivers import receivers | ||
|
||
|
||
|
||
signals.account_user_signed_up.connect(receivers.account_user_signed_up) |
3 changes: 3 additions & 0 deletions
3
pinax/projects/social_project/apps/request_receivers/receivers.py
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
def account_user_signed_up(sender, **kwargs): | ||
pass |
11 changes: 11 additions & 0 deletions
11
pinax/projects/social_project/apps/request_receivers/tests.py
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from django.test import TestCase | ||
|
||
|
||
|
||
class RecieverTest(TestCase): | ||
|
||
def test_account_user_signed_up(self): | ||
""" | ||
ensure behavior of account_user_signed_up behavior works. | ||
""" | ||
pass |
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 |
---|---|---|
|
@@ -191,6 +191,7 @@ | |
"debug_toolbar", | ||
|
||
# internal (for now) | ||
"request_receivers", | ||
"analytics", | ||
"profiles", | ||
"account", | ||
|