Clone wiki

djpubsubhubbub / Installation


This is a quick guide to go through the install process for the djpubsubhubbub Django app.


djpubsubhubbub depends on the following 2 apps.

Both are easily installed via pip:

$ sudo pip install django-easyconfig feedparser


To install the app, you can also just use pip:

$ sudo pip install djpubsubhubbub

To manually install, just clone the repository found at:

On the shell run:

$ python build
$ sudo python install

Next add the app to your projects INSTALLED_APPS setting in your file:


Now run syncdb to get the apps models added to your database:

$ python syncdb

If you have South installed then you will need to run a migrate because djpubsubhubbub also provides migration files to help easy any schema changes.

$ python migrate djpubsubhubbub

Finally add the djpubsubhubbub url mappings to your file:

urlpatterns = patterns('',
    url(r'^hub/', include('djpubsubhubbub.urls')),

Done and Done!

That's pretty much it for the install.

To add a hub subscription, the Subscription model's manager has some helper methods. Here is a basic example of usage:

from djpubsubhubbub.models import Subscription

# This will subscribe to a new feed, via the specified hub url
sub = Subscription.objects.subscribe('', hub='')

# Now we can unsubscribe from this feed...
Subscription.objects.unsubscribe(sub.topic, hub=sub.hub)

There are some other ways to customize a few features or add headers to requests. See the SuperFeedr Tutorial for an example of how that works.

I hope to update these docs more soon!