deadlock
deadlock

Reputation: 7310

Simple Activity Feed with Django and Redis

How can one build a simple activity feed using Django and Redis to store all the feed items for a particular user. I'm looking for a full in depth answer since there isn't much step by step instructions anywhere.

For Example:

Bob liked John's picture (2 seconds ago)

Bob started following you (5 minutes ago)

(Each user's feed is filled with the latest 10 events from all followers)

What are the steps required to make this possible? What changes need to be made to the settings.py? How can one set up the views.py? How can one connect the Redis Backend to Django if it is on another server?

If anyone could give a step by step answer with examples, that would be much appreciated. I know there are a lot of other users from stackoverflow who are looking for this answer as well! the community would appreciate this!

Upvotes: 0

Views: 711

Answers (1)

Frantz Romain
Frantz Romain

Reputation: 846

In one project I used Django-Notification for displaying and letting users know about latest activities. As far as redis, your django project uses Sessions, and makes queries to your database on most web pages. SO Just have Redis handle sessions rather than DJango. This article goes more in depth on usind Redis. Good luck :)

Upvotes: 1

Related Questions