I am trying to get rate of the user who has written the comment.
this is the scenario:
I hold the comment about Something in my hand, I hold the user in my hand who wrote this comment Something. Now I need to know the rate which is given by the user to this Something.
these are my models:
class Rate(models.Model):
of_user_r = models.ForeignKey(User)
of_something_r = models.ForeignKey(Something)
rate = models.IntegerField()
class Comment(models.Model):
of_user_c = models.ForeignKey(User)
of_something_c = models.ForeignKey(Something)
i did: {{comment.of_user_c.of_user_r.rate}}
, but I getting nothing in template.
this is the vusual:
I need the rate of this Something which is given by this User.