Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add signup_code_sent signal

  • Loading branch information...
commit 182cb8de15a53cb3fb17688d1a8ba56a7400e325 1 parent b9f8373
@paltman paltman authored
View
6 pinax/apps/signup_codes/models.py
@@ -11,7 +11,7 @@
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
-from pinax.apps.signup_codes.signals import signup_code_used
+from pinax.apps.signup_codes.signals import signup_code_sent, signup_code_used
class SignupCode(models.Model):
@@ -90,6 +90,10 @@ def send(self, group=None):
send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [self.email])
self.sent = datetime.datetime.now()
self.save()
+ signup_code_sent.send(
+ sender=SignupCode,
+ signup_code=self
+ )
class SignupCodeResult(models.Model):
View
1  pinax/apps/signup_codes/signals.py
@@ -1,4 +1,5 @@
import django.dispatch
+signup_code_sent = django.dispatch.Signal(providing_args=["signup_code"])
signup_code_used = django.dispatch.Signal(providing_args=["signup_code_result"])
Please sign in to comment.
Something went wrong with that request. Please try again.