O'Reilly logo

Django By Example by Antonio Melé

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a generic activity stream application

Many social websites show an activity stream to their users, so that they can track what other users do in the platform. An activity stream is a list of recent activities performed by a user or a group of users. For example, Facebook's News Feed is an activity stream. Example actions can be User X bookmarked image Y or User X is now following user Y. We will build an activity stream application so that every user can see recent interactions of users he follows. To do so, we will need a model to save the actions performed by users on the website and simple way to add actions to the feed.

Create a new application named actions inside your project with the following command:

django-admin startapp actions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required