Bruno Renié  committed 2896b38

Skipping PubSubHubbub subscriptions when DEBUG is True

  • Participants
  • Parent commits bc1cc9c

Comments (0)

Files changed (2)

 .. _django-debug-toolbar:
+When running `` updatefeeds`` on your development machine, make sure
+you have ``DEBUG = True`` in your settings to avoid making PubSubHubbub
+subscription requests without any valid callback URL.

File feeds/

 import feedparser
 USER_AGENT = 'Aspirator/dev +'
+from django.conf import settings
 from django.db import transaction
 from django_push.subscriber.models import Subscription
         Initiates a PubSubHubbub subscription and
         renews the lease if necessary.
+        if settings.DEBUG:
+            # Do not use PubSubHubbub on local development
+            return
             subscription = Subscription.objects.get(topic=topic_url)
         except Subscription.DoesNotExist: