Reverse Relations
comment_set reads the other side.
Example
post = Post.objects.first()
post.comment_set.all()
# or related_name="comments" -> post.comments.all()Exercise
Reverse name.
post.comment.all()
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.