Merge pull request #35 from fusionbox/django1.6
Another fix for Django 1.6 support This addresses the removal of CHUNK_SIZE due to https://code.djangoproject.com/ticket/18702 in django/django@70679243d1fix_request_path_info
commit
f17493ebb9
|
|
@ -7,6 +7,8 @@ python:
|
||||||
env:
|
env:
|
||||||
- DJANGO=django==1.4.5
|
- DJANGO=django==1.4.5
|
||||||
- DJANGO=django==1.5
|
- DJANGO=django==1.5
|
||||||
|
- DJANGO=https://github.com/django/django/archive/master.zip
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
exclude:
|
exclude:
|
||||||
- python: "3.3"
|
- python: "3.3"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
Changelog
|
Changelog
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
Version 0.5.1
|
||||||
|
-------------
|
||||||
|
|
||||||
|
* Add Django 1.6 support.
|
||||||
|
|
||||||
Version 0.5 (2013-04-20)
|
Version 0.5 (2013-04-20)
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,4 @@ Release logic:
|
||||||
6. git commit
|
6. git commit
|
||||||
7. push to github
|
7. push to github
|
||||||
"""
|
"""
|
||||||
__version__ = "0.5"
|
__version__ = "0.5.1"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,11 @@ from .query_translate import translate_polymorphic_field_path
|
||||||
|
|
||||||
# chunk-size: maximum number of objects requested per db-request
|
# chunk-size: maximum number of objects requested per db-request
|
||||||
# by the polymorphic queryset.iterator() implementation; we use the same chunk size as Django
|
# 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
|
Polymorphic_QuerySet_objects_per_request = CHUNK_SIZE
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,8 @@ class InitTestModelSubclass(InitTestModel):
|
||||||
# models from github issue
|
# models from github issue
|
||||||
class Top(PolymorphicModel):
|
class Top(PolymorphicModel):
|
||||||
name = models.CharField(max_length=50)
|
name = models.CharField(max_length=50)
|
||||||
|
class Meta:
|
||||||
|
ordering = ('pk',)
|
||||||
class Middle(Top):
|
class Middle(Top):
|
||||||
description = models.TextField()
|
description = models.TextField()
|
||||||
class Bottom(Middle):
|
class Bottom(Middle):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue