[Answer]-Django related manager – get specific data

1👍

Yes, your attempt doesn’t work because the relationship from User to Rate is backwards. This means you can’t do that query directly in the template: you’d need a model method or a template filter that accepts arguments. The basic query syntax would be:

Rate.objects.filter(user=comment.user)

Leave a comment