Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

A simple way for objects to subscribe to other objects for a "feed-like" functionality in a Django project

Project description

A simple way for objects to subscribe to other objects for a “feed-like” functionality in a Django project.

Installation

pip install django-generic-feeds

or

Run setup.py install or add to your Python path and include 'feeds' in your INSTALLED_APPS setting.

Usage

Make a new feed:

from feeds.models import Feed

feed = Feed.objects.create()

Add a subscription to a feed:

from myapp.models import Event

event = Event.objects.get(pk=36)
feed.add_subscription(event)

Then you can add an activity:

from feeds.models import add_activity

add_activity(actor=request.user, verb='attended', obj=event)

Then the feed’s activity will be populated with this activity:

print feed.activity.all()

See the source code for more.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-generic-feeds-0.1.5.tar.gz (4.3 kB) Copy SHA256 hash SHA256 Source None Jun 14, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page