Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(18)  |  Call(18)  |  Derive(0)  |  Import(0)

src/d/j/django-coop-HEAD/coop/models.py   django-coop(Download)
                validate(feed_url)
                # log.debug(u"Try to subscribe to feed %s" % feed_url)
                Subscription.objects.subscribe(feed_url, hub="%s/hub/" % host)
            except ValidationError, e:
                log.debug(u" Impossible to subscribe to %s : %s" % (feed_url, e))

src/d/j/django-coop-0.7.3/coop/models.py   django-coop(Download)
                validate(feed_url)
                # log.debug(u"Try to subscribe to feed %s" % feed_url)
                Subscription.objects.subscribe(feed_url, hub="%s/hub/" % host)
            except ValidationError, e:
                log.debug(u" Impossible to subscribe to %s : %s" % (feed_url, e))

src/d/j/django-coop-HEAD/coop/jobs/monthly/renew_subscription.py   django-coop(Download)
    def execute(self):
        for s in Subscription.objects.all():
            Subscription.objects.subscribe(s.topic, hub=s.hub)
 
 

src/b/a/batucada-HEAD/apps/links/tasks.py   batucada(Download)
            log.debug("Attempting subscription of topic %s with hub %s" % (
                feed_url, hub))
            subscription = Subscription.objects.subscribe(feed_url, hub=hub)
            log.info("Created subscription with callback url: %s" % (
                subscription.callback_url,))

src/d/j/django-rdfalchemy-HEAD/djrdf/import_rdf/models.py   django-rdfalchemy(Download)
            try:            
                validate(feed_url)
                Subscription.objects.subscribe(feed_url, hub=self.hub)
            except ValidationError:
                pass

src/a/p/apropost-HEAD/apropost/views.py   apropost(Download)
                raise ValueError("No such hub for %s :(" % feed_url)
 
            sub = Subscription.objects.subscribe(feed_url, hub=hub_url)
            author = Author.objects.create(
                atom_id=url,

src/d/j/djangoproject.com-HEAD/aggregator/management/commands/update_subscriptions.py   djangoproject.com(Download)
        for url in missing_feeds:
            logger.info(u'Subscribing to {0}'.format(url))
            Subscription.objects.subscribe(url, settings.PUSH_HUB)
 
        for subscription in Subscription.objects.filter(topic__in=extra_feeds):

src/r/a/raspberryio-HEAD/raspberryio/aggregator/models.py   raspberryio(Download)
    def save(self, **kwargs):
        super(Feed, self).save(**kwargs)
        if settings.SUPERFEEDR_CREDS != None and self.approval_status == APPROVED_FEED:
            Subscription.objects.subscribe(self.feed_url, settings.PUSH_HUB)
 

src/d/j/djangoproject.com-HEAD/aggregator/models.py   djangoproject.com(Download)
    def save(self, **kwargs):
        super(Feed, self).save(**kwargs)
        if settings.SUPERFEEDR_CREDS is not None:
            if self.approval_status == APPROVED_FEED:
                Subscription.objects.subscribe(self.feed_url, settings.PUSH_HUB)

src/d/j/django-push-HEAD/tests/subscriber/tests.py   django-push(Download)
    def test_subscribing(self, post):
        post.return_value = response(status_code=202)
        s = Subscription.objects.subscribe("http://example.com/feed",
                                           "http://hub.domain.com/hub")
        url = reverse('subscriber_callback', args=[s.pk])
    def test_subscription_secret(self, post):
        post.return_value = response(status_code=202)
        s = Subscription.objects.subscribe(
            'http://foo.com/insecure', hub='http://insecure.example.com/hub')
        self.assertEqual(s.secret, '')
        s = Subscription.objects.subscribe(
            'http://foo.com/secure', hub='https://secure.example.com/hub')
    def test_sync_subscribing(self, post):
        post.return_value = response(status_code=204)
        Subscription.objects.subscribe("http://example.com/feed",
                                       "http://hub.domain.com/hub")
        post.assert_called_once()
    def test_subscribe_lease_seconds(self, post):
        post.return_value = response(status_code=202)
        with self.settings(PUSH_LEASE_SECONDS=14):  # overriden in the call
            s = Subscription.objects.subscribe('http://test.example.com/feed',
                                               hub='http://hub.example.com',