Removed obsolete compatibility code
This commit is contained in:
parent
0440c7a794
commit
902ad5df4a
|
@ -1,7 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import absolute_import, print_function, unicode_literals
|
from __future__ import absolute_import, print_function, unicode_literals
|
||||||
|
|
||||||
import django
|
from collections import Counter
|
||||||
|
|
||||||
from aldryn_apphooks_config.managers.parler import (
|
from aldryn_apphooks_config.managers.parler import (
|
||||||
AppHookConfigTranslatableManager, AppHookConfigTranslatableQueryset,
|
AppHookConfigTranslatableManager, AppHookConfigTranslatableQueryset,
|
||||||
)
|
)
|
||||||
|
@ -9,11 +10,6 @@ from django.contrib.sites.models import Site
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
|
|
||||||
try:
|
|
||||||
from collections import Counter
|
|
||||||
except ImportError:
|
|
||||||
from .compat import Counter
|
|
||||||
|
|
||||||
|
|
||||||
class TaggedFilterItem(object):
|
class TaggedFilterItem(object):
|
||||||
|
|
||||||
|
@ -129,12 +125,7 @@ class GenericDateTaggedManager(TaggedFilterItem, AppHookConfigTranslatableManage
|
||||||
queryset_class = GenericDateQuerySet
|
queryset_class = GenericDateQuerySet
|
||||||
|
|
||||||
def get_queryset(self, *args, **kwargs):
|
def get_queryset(self, *args, **kwargs):
|
||||||
try:
|
return super(GenericDateTaggedManager, self).get_queryset(*args, **kwargs)
|
||||||
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
|
|
||||||
|
|
||||||
def published(self):
|
def published(self):
|
||||||
return self.get_queryset().published()
|
return self.get_queryset().published()
|
||||||
|
|
Loading…
Reference in New Issue