Mercurial > public > sg101
diff comments/models.py @ 743:66d46d31d543
Django 1.6: get_query_set -> get_queryset.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 29 Dec 2013 13:45:49 -0600 |
parents | ee87ea74d46b |
children | 4619290d171d |
line wrap: on
line diff
--- a/comments/models.py Sun Dec 29 13:38:50 2013 -0600 +++ b/comments/models.py Sun Dec 29 13:45:49 2013 -0600 @@ -21,7 +21,7 @@ def for_object(self, obj, filter_public=True): """QuerySet for all comments for a particular model instance.""" ct = ContentType.objects.get_for_model(obj) - qs = self.get_query_set().filter(content_type__pk=ct.id, + qs = self.get_queryset().filter(content_type__pk=ct.id, object_id=obj.id) if filter_public: qs = qs.filter(is_public=True)