Django Activity Stream Tutorial: Actors, Actions, and Targets
An activity stream represents events such as a user commenting on an article or following another account. django-activity-stream organizes those events around an actor, a verb, and optional related objects. Building a useful feed requires choosing meaningful events and deciding which viewers may see the objects they reference.
Here's a popular Django Activity Stream video — watch it, then summarize it with one click. Or paste any other YouTube link below.
— or paste your own YouTube link —
Want to keep the key points from a YouTube video? Paste the link below to turn it into structured notes.
Why Use Django Activity Stream Tutorial: Actors, Actions, and Targets
- Describe events using actors and verbs
- Associate actions with relevant target objects
- Record activity at intentional application points
- Query feeds around users or followed objects
- Filter events that reference private content
Frequently Asked Questions
What is the actor in an activity record?
The actor is the entity that performed the action, often a user. The verb describes what happened, while related objects supply context such as the item affected by that action.
Should every database update become a feed event?
An activity feed should reflect events meaningful to its audience. Recording every implementation-level change can create noise, duplicate descriptions of one action, and expose internal operations that users do not need to see.
Does an action record preserve the referenced object forever?
A reference can point to an object that later changes or disappears. Decide how the feed should display renamed or deleted content instead of assuming its original context will always remain available.
How should private objects affect feed visibility?
Seeing an activity record should not grant access to its target automatically. Apply the application's visibility rules when querying or rendering the feed so event text does not disclose protected content.
Where should event creation occur in an application workflow?
Choose a point that represents successful completion of the intended action. Consider transaction timing and repeated requests so failed writes or retries do not leave misleading or duplicated activity records.