[Fixed]-Store user specific data for each object

1👍

I think you can do that by defining a simple model:

class Rating(models.Model):
    article = models.ForeignKey(Article, ..., related_name='ratings')
    user = models.ForeignKey(settings.AUTH_USER_MODEL,, ..., related_name='ratings')
    rate = models.IntegerField()

and then access ratings by:

request.user.ratings
👤albar

Leave a comment