Diederik van der Boor
4aa3355f5c
flake8 fixes
2016-12-19 11:28:41 +01:00
Diederik van der Boor
3170ea95c2
autoflake: remove unused imports and statements
2016-12-19 11:12:40 +01:00
Diederik van der Boor
1d13b4f3c5
autopep8, except line length
2016-12-19 11:10:03 +01:00
Diederik van der Boor
7cd5f8455a
Merge pull request #235 from benkonrath/contrib-guardian
...
Add helper function for django-guardian.
2016-09-12 10:44:50 +02:00
Diederik van der Boor
c97d1ef088
Let tests pass on Django 1.10.1
...
The change for https://code.djangoproject.com/ticket/27073
in d4eefc7e2a
removed the _default_manager assignment
2016-09-11 21:32:19 +02:00
Ben Konrath
c695029cfa
Add helper function for django-guardian.
2016-09-01 12:15:21 +02:00
Diederik van der Boor
b4a02e9c47
Let last base_manager test allow different results in Django 1.10
...
This is after all, how Django 1.10's new base manager works.
2016-08-10 13:55:09 +02:00
Diederik van der Boor
bb0e71ee8f
autopep8 by pycharm
2016-08-10 13:54:44 +02:00
Diederik van der Boor
10ab3ad14c
Fix compatibility with older Django versions
2016-08-10 13:51:30 +02:00
Diederik van der Boor
3817061467
Fix unit tests for defer() / only()
...
Added get_deferred_fields() to ShowFieldBase
2016-08-10 13:43:31 +02:00
Diederik van der Boor
dd89458615
Fixed expressions unit test, DateTime refactored in Django 1.10
2016-08-10 13:20:16 +02:00
Diederik van der Boor
1a998733e1
Fix QuerySte repr output for Django 1.10 in unit tests
2016-08-05 17:21:53 +02:00
Austin Matsick
b254c3fc97
#220 Skip `test_save_to_non_default_database` on Django 1.4.
2016-06-13 09:00:48 -05:00
Austin Matsick
f1735a8bea
#220 Pass hints to returned queryset in PolymorphicManager.get_queryset.
2016-06-12 22:15:37 -05:00
Alex Alvarez
d714040331
Adding < django 1.6 flags in code and test
2016-06-03 12:45:21 -04:00
Alex Alvarez
a16345874e
Issue #213 : Don't modify Q passed in as arguments
2016-06-02 01:10:43 -04:00
Austin Matsick
4aece2b5d3
#216 Use self._state.db instead of `using` kwarg in model methods.
...
Thanks to @vdboor for the suggestion.
Also:
- Add missing `using` kwargs in query_translate functions.
- Add a couple unit tests for non-default database functionality.
2016-05-30 18:55:03 -05:00
Andrew Dodd
120f124b91
Issue #200 - Exclude super-class from proxy model query sets
...
These changes prevent the query sets on 'proxy' models from including
the items from the 'super-class'.
2016-05-04 15:52:44 +02:00
NotSqrt
b8c8ff7bfa
Test that expressions are supported
2016-04-26 20:12:04 +02:00
Diederik van der Boor
88bb23b506
Fix deferred loading of 'pk' field
2016-02-18 13:14:49 +01:00
Diederik van der Boor
4277c148aa
Merge pull request #161 from theatlantic/pr-add-deferred-fields
...
Add support for qset.only() and qset.defer()
2016-02-17 11:14:48 +01:00
slide333333
9b7c2d72b7
Added test cases for complex expressions in aggregate/annotate
2016-01-21 15:32:28 +01:00
Frankie Dintino
6df1403de5
Add support for qset.only() and qset.defer()
2016-01-04 00:36:48 -05:00
gilgamezh
b17aa58ad9
Merge remote-tracking branch 'upstream/master' into allow_extra_manager
2015-12-29 17:49:09 -03:00
Diederik van der Boor
b0657ef9c7
Fix reverse relation support for ___ filter operator
2015-12-29 14:52:58 +01:00
Diederik van der Boor
009069a32b
Avoid auto-proxying all methods to the queryset.
...
This is unwanted behavior, and django provides much better methods for
it instead. (PolymorphicQuerySet.as_manager() / PolymorphicManager.from_queryset()
2015-12-28 17:10:58 +01:00
Diederik van der Boor
5191b6c130
Also remove showfields imports from __init__.py
...
If we're to cause pain, let it be once.
2015-12-28 17:10:42 +01:00
Diederik van der Boor
50f21dfa43
Rename manager.py => managers.py for consistency
2015-12-28 17:10:42 +01:00
Diederik van der Boor
07242d210f
Fix "Model" __ "_field" query support
...
Broken by 24e6b21204 for Django 1.9
upgrade
2015-12-28 16:19:27 +01:00
Diederik van der Boor
b7431b2d06
Fix PEP8 block comment issues (E265)
2015-12-28 15:16:42 +01:00
Diederik van der Boor
aaf06c71a5
Fix PEP8 whitespace issues
...
autopep8 -r polymorphic/ example/ -i
--select=E112,E113,E115,E116,E122,E123,E125,E127,E128,E201,E202,E203,E211,E225,E226,E227,E228,E231,E251,E261,E262,E271,E272,E273,E274,E301,E302,E303,E304,E309,E711,E713,W291,W293,W391
--exclude migrations,south_migrations
(line conditiation fixes: E123,E125,E122,E127,E128)
2015-12-28 15:16:29 +01:00
gilgamezh
f419e37ab3
Allow to set a 'extra' custom manager withut override the _default_manager
2015-12-23 21:07:44 -03:00
Jonas Haag
24e6b21204
Fix a handful of warnings and remove some unused compatibility code
2015-12-16 10:31:36 -03:00
Hugo Osvaldo Barrera
adcad20b48
Update all tests (and runtests.py)
2015-12-16 10:31:36 -03:00
Diederik van der Boor
c8973d1fba
Fixed Python 2.6 tests, and fixed tox.ini from PR #162 for python 3
2015-10-01 14:35:34 +02:00
Diederik van der Boor
2ffbd51844
Added as_manager() support for querysets
2015-10-01 14:26:28 +02:00
Diederik van der Boor
17c2445e39
Merge pull request #120 from theatlantic-pr/cleanup-test-noise
...
Conflicts:
polymorphic/tests.py
2015-04-08 13:33:54 +02:00
Diederik van der Boor
c947c3dec1
Merge pull request #119 from theatlantic/child-model-custom-pk-bug
...
Bug with queryset results on base model where child model has a custom primary key
2015-04-08 13:09:35 +02:00
Frankie Dintino
ad63c6a442
Test missing items bug in qset on child of PolymorphicModel w custom pk
...
refs #66
2015-01-31 17:10:57 -05:00
Frankie Dintino
fd24863db5
Cleanup tests by removing spurious errors and unnecessary noise
...
- Remove diamond inheritance tests since these test a bug in Django,
not in django_polymorphic.
- Fix spurious print message in test_primary_key_custom_field_problem(),
where uuid instances are for some reason being compared to uuid.UUID
classes. Replaced with a test that checks that the primary key values
are valid UUIDs.
- Remove Django > 1.6 conditionals wrapping the multiple inheritance
tests and model definitions, in favor of using the definitions for
Django 1.7. Django 1.7 requires a custom primary key when using concrete
model inheritance because failing to do so is potentially ambiguous. Adding
the custom primary key does not break tests in older Django versions.
2015-01-31 16:59:55 -05:00
Chris Barna
d56d9bfd15
Add tests for instance._default manager. Refs #96
2015-01-31 13:17:56 -05:00
Diederik van der Boor
ca6fba91ba
PEP8-ify PR #67 and fix trailing whitespace
...
Camp rule: leave things in a better state then you found it.
2014-12-30 13:36:25 +01:00
Diederik van der Boor
261e382556
Merge pull request #67 from hottwaj/parent_link_support
...
parent_link and related_name support for inheritance fields
2014-12-30 13:34:16 +01:00
Diederik van der Boor
948749dbdb
Remove Django 1.7 warnings
2014-10-14 17:30:25 +02:00
Diederik van der Boor
981614e5c6
Merge branch 'django_1.7_support' of https://github.com/g3rd/django_polymorphic
...
Conflicts:
docs/managers.rst
polymorphic/admin.py
polymorphic/manager.py
polymorphic/tests.py
runtests.py
2014-09-22 15:42:35 +02:00
Diederik van der Boor
cf6d2a4a41
Replace get_query_set with assignment.
...
Avoid calling the super class by accident, potentially causing loops.
Follow the django-mptt approach here.
2014-09-22 15:00:29 +02:00
Chad Shryock
734752c2e7
Django 1.7 upgrades
2014-09-16 22:11:13 -04:00
Marius Lueck
fb1795ad12
Fixed compatibility with django 1.8
2014-07-25 11:48:07 +02:00
Diederik van der Boor
b9d7e9f234
Improved description of test_proxy_get_real_instance_class unit test
...
Camp life rule: leave things better then you found them.
2014-04-29 14:07:33 +02:00
John Furr
8687e135a3
Test that proxy models derived from PolyMorphicBase classes
...
can call get_real_instance() and get_real_instance_class()
Includes:
def test_proxy_get_real_instance_class(self):
2014-04-29 07:35:27 -04:00