Removed obsolete compatibility code

This commit is contained in:
Iacopo Spalletti 2017-06-06 22:36:30 +02:00
parent 0440c7a794
commit 902ad5df4a
No known key found for this signature in database
GPG key ID: BDCBC2EB289F60C6

View file

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import django
from collections import Counter
from aldryn_apphooks_config.managers.parler import (
AppHookConfigTranslatableManager, AppHookConfigTranslatableQueryset,
)
@ -9,11 +10,6 @@ from django.contrib.sites.models import Site
from django.db import models
from django.utils.timezone import now
try:
from collections import Counter
except ImportError:
from .compat import Counter
class TaggedFilterItem(object):
@ -129,12 +125,7 @@ class GenericDateTaggedManager(TaggedFilterItem, AppHookConfigTranslatableManage
queryset_class = GenericDateQuerySet
def get_queryset(self, *args, **kwargs):
try:
return super(GenericDateTaggedManager, self).get_queryset(*args, **kwargs)
except AttributeError: # pragma: no cover
return super(GenericDateTaggedManager, self).get_query_set(*args, **kwargs)
if django.VERSION < (1, 8):
get_query_set = get_queryset
return super(GenericDateTaggedManager, self).get_queryset(*args, **kwargs)
def published(self):
return self.get_queryset().published()