-1

Can anyone recommend or create a tutorial on how to make a news feed similar to that of Facebook's only using Django, Tastypie (webservice API framework for Django), Redis (key-value store) and Gearman (task queue)?

Currently I have user model, post model, favorites model and a comment model. I have created Tastypie resources with these models to allow for favoriting, liking, commenting and posting.

I would like to know how to generate feed actions that apply directly to the user. For example:

User1 commented on your post. (2 seconds ago)
User2 liked your post. (3 mins ago)
User2 & User1 favorited your post (5 mins ago)

I really require in depth examples and tutorials on how to build an activity feed using the technologies above. Any help would be appreciated.

deadlock
  • 7,048
  • 14
  • 67
  • 115

1 Answers1

4

You can create an activity stream with the app django-activity-stream.

msc
  • 3,780
  • 1
  • 22
  • 27
  • can I use django-activity-stream with Redis? and also if the action is reversed, am I able to delete the activity? – deadlock Dec 15 '12 at 19:22
  • You can use Redis as the cache. Since the activities are stored in the database/cache, yes, you can delete those too using signals for example. – msc Dec 15 '12 at 20:41
  • One thing to note about that project is that it doesn't work when a new user is following a particular action creator. Facebook would show previous feeds in situations like this. – KVISH Mar 03 '14 at 23:03