Max Larrain
Max Larrain

Reputation: 77

User likes on django accumulation

I have a simple pinterest clone app built and have a basic activity stream setup. The activity stream only records when a new image is created, when an image is liked, when a new user is created, or when a followed user follows another user.

What I would like to implement and do not know how is accumulation, for example if 2 or more user like a certain image, I would prefer the activity stream to say:

"User 1 and User 2 like image"

Can any one help me achieve this?

Upvotes: 0

Views: 136

Answers (1)

C14L
C14L

Reputation: 12558

The Action models in django-activity-stream could be helpful.

For example, when an Actor performs an action, you could look up if there was recently a similar Verb and Target combination by a different Actor, and then replace that earlier instance with a new one that includes the most recent Actor.

Upvotes: 1

Related Questions