Пример #1
0
def connect_feed(sender, created, instance, **kwargs):
    if created:
        t = cannonize(instance.title)
        for m in Member.objects.all():
            if t.rfind(cannonize(m.name)) != -1:
                Link.objects.create(url=instance.url, title = instance.title, content_object=m)
                print u'connected feed to %s' % m
                return
Пример #2
0
def connect_feed(sender, created, instance, **kwargs):
    if created:
        t = cannonize(instance.title)
        rss_type, _ = LinkType.objects.get_or_create(title="רסס")
        for m in Member.objects.all():
            if t.rfind(cannonize(m.name)) != -1:
                Link.objects.create(url=instance.url, title=instance.title, content_object=m, link_type=rss_type)
                print u"connected feed to %s" % m
                return
Пример #3
0
def connect_feed(sender, created, instance, **kwargs):
    if created:
        t = cannonize(instance.title)
        rss_type, _  = LinkType.objects.get_or_create(title='רסס')
        for m in Member.objects.all():
            if t.rfind(cannonize(m.name)) != -1:
                Link.objects.create(url=instance.url, title = instance.title,
                                    content_object=m, link_type=rss_type)
                _logger.info(u'connected feed to {}'.format(m))
                return
Пример #4
0
def connect_feed(sender, created, instance, **kwargs):
    if created:
        t = cannonize(instance.title)
        rss_type, _  = LinkType.objects.get_or_create(title='רסס')
        for m in Member.objects.all():
            if t.rfind(cannonize(m.name)) != -1:
                Link.objects.create(url=instance.url, title = instance.title,
                                    content_object=m, link_type=rss_type)
                logger.info(u'connected feed to %s' % m)
                return