adapt to recent version of django-model-utils
This commit is contained in:
parent
8fb8cf62fe
commit
3ebef31d1e
|
@ -1,7 +1,6 @@
|
|||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.db.models.query import QuerySet
|
||||
from django.db.models import Q
|
||||
from model_utils.managers import PassThroughManager
|
||||
from django.db.models import Q, Manager
|
||||
|
||||
|
||||
class CachedQuerySet(QuerySet):
|
||||
|
@ -10,7 +9,7 @@ class CachedQuerySet(QuerySet):
|
|||
return instance
|
||||
|
||||
|
||||
CachedManager = PassThroughManager.for_queryset_class(CachedQuerySet)
|
||||
CachedManager = Manager.from_queryset(CachedQuerySet)
|
||||
|
||||
|
||||
class TagManager(CachedManager):
|
||||
|
@ -71,7 +70,7 @@ class JournalQuerySet(QuerySet):
|
|||
.distinct()
|
||||
|
||||
|
||||
class JournalManager(PassThroughManager.for_queryset_class(JournalQuerySet)):
|
||||
class JournalManager(Manager.from_queryset(JournalQuerySet)):
|
||||
def get_query_set(self):
|
||||
return super(JournalManager, self).get_query_set() \
|
||||
.prefetch_related('objectdata_set__content_type',
|
||||
|
|
45
setup.py
45
setup.py
|
@ -90,25 +90,28 @@ def get_version():
|
|||
return version
|
||||
|
||||
setup(name='django-journal',
|
||||
version=get_version(),
|
||||
license='AGPLv3',
|
||||
description='Keep a structured -- i.e. not just log strings -- journal'
|
||||
' of events in your applications',
|
||||
url='http://dev.entrouvert.org/projects/django-journal/',
|
||||
download_url='http://repos.entrouvert.org/django-journal.git/',
|
||||
author="Entr'ouvert",
|
||||
author_email="info@entrouvert.com",
|
||||
packages=find_packages(os.path.dirname(__file__) or '.'),
|
||||
include_package_data=True,
|
||||
cmdclass={'build': build, 'install_lib': install_lib,
|
||||
'compile_translations': compile_translations,
|
||||
'sdist': sdist,
|
||||
'test': test},
|
||||
install_requires=[
|
||||
'django >= 1.4.2',
|
||||
'django-model-utils<2.4',
|
||||
],
|
||||
setup_requires=[
|
||||
'django >= 1.4.2',
|
||||
],
|
||||
version=get_version(),
|
||||
license='AGPLv3',
|
||||
description='Keep a structured -- i.e. not just log strings -- journal'
|
||||
' of events in your applications',
|
||||
url='http://dev.entrouvert.org/projects/django-journal/',
|
||||
download_url='http://repos.entrouvert.org/django-journal.git/',
|
||||
author="Entr'ouvert",
|
||||
author_email="info@entrouvert.com",
|
||||
packages=find_packages(os.path.dirname(__file__) or '.'),
|
||||
include_package_data=True,
|
||||
cmdclass={
|
||||
'build': build,
|
||||
'install_lib': install_lib,
|
||||
'compile_translations': compile_translations,
|
||||
'sdist': sdist,
|
||||
'test': test
|
||||
},
|
||||
install_requires=[
|
||||
'django >= 1.7',
|
||||
'django-model-utils',
|
||||
],
|
||||
setup_requires=[
|
||||
'django >= 1.4.2',
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue