Add a function to fire off a successful_campaign signal

pull/1/head
Raymond Yee 2012-04-03 07:08:05 -07:00
parent 01799924a9
commit 3dcacf881f
1 changed files with 8 additions and 1 deletions

View File

@ -309,7 +309,14 @@ def support_campaign(do_local=True):
yield sel
#sel.quit()
def successful_campaign_signal():
"""fire off a success_campaign signal and send notifications"""
import regluit
from notification.engine import send_all
c = regluit.core.models.Campaign.objects.get(id=3)
regluit.core.signals.successful_campaign.send(sender=None, campaign=c)
send_all()
def berkeley_search():
sel = webdriver.Firefox()