# Path: apps/feeds/models.py
# class Feed(models.Model):
#     feed_url = models.URLField()
#     list_id = models.IntegerField(blank=True, null=True)
#     created_by = models.ForeignKey(settings.AUTH_USER_MODEL)
# 
#     date_created = models.DateTimeField(auto_now_add=True)
#     date_modified = models.DateTimeField(auto_now=True)
# 
#     class Meta:
#         unique_together = ('feed_url', 'created_by')
# 
#     def __unicode__(self):
#         return self.feed_url


import requests
from djpubsubhubbub.signals import updated
from .models import Feed



def update_handler(sender, update, **kwargs):
    """
    Process new content being provided from SuperFeedr.
    Check if there is no existing clip for that URL
    before trying to create it.

    """


# Path: apps/feeds/models.py
# class Feed(models.Model):
#     feed_url = models.URLField()
#     list_id = models.IntegerField(blank=True, null=True)
#     created_by = models.ForeignKey(settings.AUTH_USER_MODEL)
# 
#     date_created = models.DateTimeField(auto_now_add=True)
#     date_modified = models.DateTimeField(auto_now=True)
# 
#     class Meta:
#         unique_together = ('feed_url', 'created_by')
# 
#     def __unicode__(self):
#         return self.feed_url


# Path: apps/feeds/signals.py
import requests
from djpubsubhubbub.signals import updated
from .models import Feed




def update_handler(sender, update, **kwargs):
    """
    Process new content being provided from SuperFeedr.
    Check if there is no existing clip for that URL
    before trying to create it.

    """


    feeds = Feed.objects.filter(feed_url=sender.topic)