I am deciding on how to track if a user has seen a post in the timeline or not.
There is Post
and Comment
model like this.
class Comment(models.Model):
author = models.ForeignKey('UserProfile')
title = models.CharField(max_length=255)
text = models.TextField(null=True, blank=True)
date_created = models.DateTimeField()
post = models.ForeignKey('Post', related_name='comments')
class Post(ContentTypeModel):
title = models.CharField(max_length=255)
group = models.ForeignKey('UserGroup', null=True)
date_updated = models.DateTimeField()
Suggestions about best practices on how to track if post
has been seen by particular member of a user group
will be nice.
I managed to do as was suggested, i.e. adding m2m relation to track who viewed the post:
This way i can compare
post.date_updated
toviewer.last_seen
and get desired filtering on who have seen the update/create of Post.