diff --git a/.travis.yml b/.travis.yml index 94d9412..54e966f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ python: env: - DJANGO=django==1.4.5 - DJANGO=django==1.5 + - DJANGO=https://github.com/django/django/archive/master.zip + matrix: exclude: - python: "3.3" diff --git a/docs/changelog.rst b/docs/changelog.rst index 44ded5f..6fa06e0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,11 @@ Changelog ========== +Version 0.5.1 +------------- + +* Add Django 1.6 support. + Version 0.5 (2013-04-20) ------------------------ diff --git a/polymorphic/__version__.py b/polymorphic/__version__.py index 451a48a..2800cab 100644 --- a/polymorphic/__version__.py +++ b/polymorphic/__version__.py @@ -11,4 +11,4 @@ Release logic: 6. git commit 7. push to github """ -__version__ = "0.5" +__version__ = "0.5.1" diff --git a/polymorphic/query.py b/polymorphic/query.py index 22cadf0..7f6d70d 100644 --- a/polymorphic/query.py +++ b/polymorphic/query.py @@ -15,7 +15,11 @@ from .query_translate import translate_polymorphic_field_path # chunk-size: maximum number of objects requested per db-request # by the polymorphic queryset.iterator() implementation; we use the same chunk size as Django -from django.db.models.query import CHUNK_SIZE # this is 100 for Django 1.1/1.2 +try: + from django.db.models.query import CHUNK_SIZE # this is 100 for Django 1.1/1.2 +except ImportError: + # CHUNK_SIZE was removed in Django 1.6 + CHUNK_SIZE = 100 Polymorphic_QuerySet_objects_per_request = CHUNK_SIZE diff --git a/polymorphic/tests.py b/polymorphic/tests.py index 2935368..376f0f3 100644 --- a/polymorphic/tests.py +++ b/polymorphic/tests.py @@ -193,6 +193,8 @@ class InitTestModelSubclass(InitTestModel): # models from github issue class Top(PolymorphicModel): name = models.CharField(max_length=50) + class Meta: + ordering = ('pk',) class Middle(Top): description = models.TextField() class Bottom(Middle):