Mercurial > public > sg101
changeset 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 | b77acb1b6a8a |
children | 8789299c75b1 |
files | comments/models.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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)