Add support for closing petitions, and emit notifications when relevant

This commit is contained in:
Trever Fischer
2012-06-09 16:49:27 -04:00
parent 72f0632080
commit 9619f5f1db
7 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
from django.db.models.signals import post_syncdb
from notification import models as notification
def create_notice_types(app, created_models, verbosity, **kwargs):
notification.create_notice_type('petition_closed', 'Petition Closed', 'A petition was closed.')
notification.create_notice_type('petition_commented', 'Petition Commented', 'A petition was commented upon.')
notification.create_notice_type('petition_opened', 'Petition Opened', 'A petition was opened.')
post_syncdb.connect(create_notice_types, sender=notification)