Commit Graph

10 Commits (e00e6d7e39329c213fc98ffca32ec248649d4499)

Author SHA1 Message Date
trbs 1c110ae4bb fix error with .defer and child models that use the same parent
When using .defer on a PolymorphicQuerySet with multiple childs that
subclass from the same polymorphic parent model yield an error like:

>>> Base.objects.defer('ModelY___field_y')
Traceback (most recent call last):
...
FieldDoesNotExist: ModelX has no field named 'field_y'

(cherry picked from commit 9500a21f82)
2018-04-16 11:08:27 +02:00
Tadas Dailyda 6013de93d3 tests for abstract/swappable model initialization
(cherry picked from commit 0fea8a4d92)
2018-04-16 10:41:50 +02:00
Jerome Leclanche 1e7237986c Specify on_delete argument for all related fields that need it 2017-07-10 09:08:11 +03:00
Jerome Leclanche 298460c4cf Drop support for Django <1.8, Python <2.7 2017-07-10 09:08:11 +03:00
Diederik van der Boor a3c9bcb14a Merge remote branch 'meshy/new-test-versions' 2017-04-06 13:57:07 +02:00
Diederik van der Boor d8cb700e58 Make sure tests can run in Django 1.11 2017-04-06 12:51:16 +02:00
Charlie Denton 8e52bdf6d1
Explicitly name ids of clashing base models
This avoids the following error in django 1.11 tests:

    polymorphic.MRODerived: (models.E005) The field 'id' from parent model 'polymorphic.mrobase3' clashes with the field 'id' from parent model 'polymorphic.mrobase1'.

Related to https://code.djangoproject.com/ticket/22442
2017-03-03 22:16:54 +00:00
Diederik van der Boor 7dc2f93148 Added plain tests for admin importing 2017-02-03 22:05:13 +01:00
Diederik van der Boor 1f15a72a80 Moved polymorphic models back to tests/__init__.py, for Django 1.6- 2017-01-09 15:12:26 +01:00
Diederik van der Boor 9493bd8bc1 split tests.py into a python package 2017-01-09 14:41:56 +01:00