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

Chapter 6. Tracking User Actions

In the previous chapter, you implemented AJAX views into your project using jQuery and built a JavaScript bookmarklet for sharing content from other websites in your platform.

In this chapter, you will learn how to build a follower system and create a user activity stream. You will discover how Django signals work and integrate Redis fast I/O storage into your project to store item views.

This chapter will cover the following points:

  • Creating many-to-many relationships with an intermediary model
  • Building AJAX views
  • Creating an activity stream application
  • Adding generic relations to models
  • Optimizing QuerySets for related objects
  • Using signals for denormalizing counts
  • Storing item views in Redis

Building a follower system ...

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