I'm trying to figure out why this works:
>>> comments = Comment.objects.all()
>>>[c.content_object for c in comments]
[returns a list of the objects the comments are attached to]
But this doesn't:
>>> c = Comment.objects.filter(id=111)
>>> c
[<Comment: Related object name here ...>]
>>> c.content_object
Traceback (most recent call last):
File "<console>", line 1, in <module>
AttributeError: 'QuerySet' object has no attribute 'content_object'
In both cases, each "c" is a Comment instance. So why does c have a content_object property in the first case but not in the second? Thanks.