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