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.
Need Help?
Email: rvause@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-generic-feeds-0.1.5.tar.gz.
File metadata
- Download URL: django-generic-feeds-0.1.5.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
802d0e5e22dbb4a24f6f59a449eaeb426f87ebadf0954da27f6183646c1bd048
|
|
| MD5 |
1d4126141bfb672e503567fa29b8950f
|
|
| BLAKE2b-256 |
74f69738f81fcc41e395a843710c628a383ed7d2c05760b6e0c022dff940870e
|