Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Delete subscriptions when deleting feeds.

  • Loading branch information...
commit de1cfb5c2ba54bbee01122a328e327cfc717415a 1 parent 1a81666
@jacobian jacobian authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 django_website/aggregator/models.py
View
4 django_website/aggregator/models.py
@@ -31,6 +31,10 @@ def save(self, **kwargs):
super(Feed, self).save(**kwargs)
Subscription.objects.subscribe(self.feed_url, settings.PUSH_HUB)
+ def delete(self, **kwargs):
+ super(Feed, self).delete(**kwargs)
+ Subscription.objects.unsubscribe(self.feed_url, settings.PUSH_HUB)
+
class FeedItemManager(models.Manager):
def create_or_update_by_guid(self, guid, **kwargs):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.