Permalink
Browse files

removed ObservedItemManager

  • Loading branch information...
1 parent 7781513 commit 54fcdf7cd6154e3093e8723f5c222292c59bb2f3 @brosner brosner committed Mar 17, 2011
Showing with 0 additions and 17 deletions.
  1. +0 −17 notification/models.py
View
@@ -222,20 +222,3 @@ def queue(users, label, extra_context=None, on_site=True, sender=None):
for user in users:
notices.append((user, label, extra_context, on_site, sender))
NoticeQueueBatch(pickled_data=pickle.dumps(notices).encode("base64")).save()
-
-
-class ObservedItemManager(models.Manager):
-
- def all_for(self, observed, signal):
- """
- Returns all ObservedItems for an observed object,
- to be sent when a signal is emited.
- """
- content_type = ContentType.objects.get_for_model(observed)
- observed_items = self.filter(content_type=content_type, object_id=observed.id, signal=signal)
- return observed_items
-
- def get_for(self, observed, observer, signal):
- content_type = ContentType.objects.get_for_model(observed)
- observed_item = self.get(content_type=content_type, object_id=observed.id, user=observer, signal=signal)
- return observed_item

0 comments on commit 54fcdf7

Please sign in to comment.