X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/9c5d9a4e77a10b4e60d89d3890e49002bd7f3993..c6d5dd71ad0d9bae811cc9002248d9399c7fdff7:/apps/newtagging/managers.py diff --git a/apps/newtagging/managers.py b/apps/newtagging/managers.py index 3107070ea..0bfec5413 100644 --- a/apps/newtagging/managers.py +++ b/apps/newtagging/managers.py @@ -15,7 +15,7 @@ class ModelTagManager(models.Manager): super(ModelTagManager, self).__init__() self.tag_model = tag_model - def get_query_set(self): + def get_queryset(self): content_type = ContentType.objects.get_for_model(self.model) return self.tag_model.objects.filter( items__content_type__pk=content_type.pk).distinct() @@ -35,11 +35,13 @@ class ModelTaggedItemManager(models.Manager): super(ModelTaggedItemManager, self).__init__() self.intermediary_table_model = tag_model.objects.intermediary_table_model - def related_to(self, obj, queryset=None, num=None): + def related_to(self, obj, queryset=None): if queryset is None: - return self.intermediary_table_model.objects.get_related(obj, self.model, num=num) + return self.intermediary_table_model.objects.get_related( + obj, self.model) else: - return self.intermediary_table_model.objects.get_related(obj, queryset, num=num) + return self.intermediary_table_model.objects.get_related( + obj, queryset) def with_all(self, tags, queryset=None): if queryset is None: