Mercurial > public > sg101
comparison gpp/forums/signals.py @ 232:a46788862737
Implement a forum favorites feature for #82
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 01 Aug 2010 21:26:12 +0000 |
parents | 500e5875a306 |
children | 3a4bbf9c2cce |
comparison
equal
deleted
inserted
replaced
231:a2d388ed106e | 232:a46788862737 |
---|---|
3 """ | 3 """ |
4 from django.db.models.signals import post_save | 4 from django.db.models.signals import post_save |
5 from django.db.models.signals import post_delete | 5 from django.db.models.signals import post_delete |
6 | 6 |
7 from forums.models import Topic, Post | 7 from forums.models import Topic, Post |
8 from forums.subscriptions import notify_topic_subscribers | 8 from forums.views.subscriptions import notify_topic_subscribers |
9 | 9 |
10 | 10 |
11 def on_topic_save(sender, **kwargs): | 11 def on_topic_save(sender, **kwargs): |
12 if kwargs['created']: | 12 if kwargs['created']: |
13 topic = kwargs['instance'] | 13 topic = kwargs['instance'] |