Skip to content

Commit

Permalink
Add a joined independently signal
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Jan 31, 2013
1 parent c86569d commit 70f00bd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/signals.rst
Expand Up @@ -19,3 +19,10 @@ kaleo.signals.invite_accepted

This signal is sent immediately after the acceptance of the invitation
has been processed.


kaleo.signals.joined_independently
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This signal is sent when someone signs up using the same email address
that exist for an invitation and they confirm that email address.
2 changes: 2 additions & 0 deletions kaleo/models.py
Expand Up @@ -56,6 +56,8 @@ def process_independent_joins(cls, user, email):
invite.to_user = user
invite.status = cls.STATUS_JOINED_INDEPENDENTLY
invite.save()
joined_independently.send(sender=cls, invitation=invite)

@classmethod
def invite(cls, from_user, to_email, message=None):
if not from_user.invitationstat.can_send():
Expand Down
1 change: 1 addition & 0 deletions kaleo/signals.py
Expand Up @@ -3,3 +3,4 @@

invite_sent = django.dispatch.Signal(providing_args=["invitation"])
invite_accepted = django.dispatch.Signal(providing_args=["invitation"])
joined_independently = django.dispatch.Signal(providing_args=["invitation"])

0 comments on commit 70f00bd

Please sign in to comment.