Commit 204b1bcf authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Added a reverse comment->parent relationship

parent 0545077c
......@@ -41,7 +41,7 @@ class Comment( models.Model ):
user = models.ForeignKey(User)
date = models.DateTimeField(
text = models.TextField()
parent = models.ForeignKey('Question')
parent = models.ForeignKey('Question', related_name='comments', related_query_name='comments')
def get_replies(self):
replies = Reply.objects.filter(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment