Removed obsolete compatibility code
This commit is contained in:
parent
0440c7a794
commit
902ad5df4a
1 changed files with 3 additions and 12 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue