Commit Graph

68 Commits (fab687c218c3bf9027ef5c6c6d532929a10f5a02)

Author SHA1 Message Date
Jerome Leclanche 0c7b1aa657 Drop support for Django 1.8 2017-08-29 19:41:42 +03:00
Jerome Leclanche 87979a6660 Remove outdated 404 url from docstrings 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 bcb8b0d3a4 Allow .order_by() to pass expressions unchanged
Fixes: #257
2017-05-22 12:53:20 +02:00
Charlie Denton 6f733d7471
Fix minor typo 2017-05-07 22:19:50 +01:00
Diederik van der Boor 61b398115b Fixed queryset processing for real (another merge fix for pr #279) 2017-04-26 16:44:54 +02:00
Diederik van der Boor 09d785f5bb Fix infinite recursion on github editing of pr #279
Fixes: 89632483a7
2017-04-26 16:38:26 +02:00
Diederik van der Boor 89632483a7 Merge branch 'master' into dj111-fix 2017-04-26 15:53:59 +02:00
un.def 78d3cd4945 Fix regression with Django < 1.9 2017-04-19 14:43:51 +03:00
un.def dbad7bd40d Migrate from unused in Django 1.11 qs.iterator() to custom qs._iterable_class 2017-04-19 12:56:04 +03:00
Charlie Denton f010c6ddf7
Get tests running on django 1.11
I'm a little concerned that this loses some of the efficiencies (in
particular, chunking) from previous versions. That's something that can
probably be improved.
2017-04-12 23:52:06 +01:00
Diederik van der Boor f9fffc44c1 Add API documentation to the package! 2017-01-09 16:53:50 +01:00
Diederik van der Boor 4aa3355f5c flake8 fixes 2016-12-19 11:28:41 +01:00
Diederik van der Boor 1d13b4f3c5 autopep8, except line length 2016-12-19 11:10:03 +01:00
Austin Matsick f1735a8bea #220 Pass hints to returned queryset in PolymorphicManager.get_queryset. 2016-06-12 22:15:37 -05: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
Austin Matsick 2f11cb6ffd #216 Specify `using` kwarg in get_real_instance method calls. 2016-05-29 14:05:45 -05:00
Austin Matsick 343aa41ec1 #216 Allow ContentType queries to be performed on non-default databases. 2016-05-27 20:35:39 -05:00
Diederik van der Boor 5aa15b226e Improve code flow for Django 1.7/1.8 in patch_lookup args 2016-03-11 17:16:05 +01:00
Diederik van der Boor 88922d7d5e Fix error when using `date_hierarchy` field in the admin
Closes: #201
2016-03-11 17:13:09 +01:00
Diederik van der Boor 6319dabcef Fix trailing whitespace in query.py 2016-03-11 17:13:01 +01: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
slide333333 c5d4687bb9 Support Django 1.8 complex expressions on aggregate/annotate 2016-01-21 13:21:21 +01:00
Frankie Dintino 6df1403de5 Add support for qset.only() and qset.defer() 2016-01-04 00:36:48 -05: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 50f21dfa43 Rename manager.py => managers.py for consistency 2015-12-28 17:10:42 +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
Jonas Haag 4da67a0fb6 Fix an issue with '.values()' queries 2015-12-16 10:31:36 -03:00
Jonas Haag 0b87a5ecc8 Fixed a Python >= 3.7 incompatibility (see PEP 479) 2015-12-16 10:31:36 -03:00
Jonas Haag 6cf187b2de Fix Django < 1.8 compatibility 2015-12-16 10:31:36 -03:00
Jonas Haag 24e6b21204 Fix a handful of warnings and remove some unused compatibility code 2015-12-16 10:31:36 -03:00
Diederik van der Boor 2ffbd51844 Added as_manager() support for querysets 2015-10-01 14:26:28 +02:00
Sander van Leeuwen ed55ceb7fa Fix Pickle exception when polymorphic model is cached
fixes issue #155
2015-09-04 16:51:22 +02:00
tyaslab 135feaf905 fixed 'source_expressions'
(cherry picked from commit 9a34a2a5017499bb12512b2387de49aa2c40fc88)
2015-04-08 13:44:35 +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 1be1fc02db Fix missing items bug in qset on child of PolymorphicModel w custom pk
fixes #66
2015-01-31 17:11:03 -05:00
ellmetha 469d063cc9 Django 1.8 alpha support 2015-01-28 00:41:34 +01:00
Diederik van der Boor e1093ff1fb Fix .non_polymorphic(), returns a copy of the queryset
Just like .filter() and such do.
2013-09-19 19:36:05 +02:00
Gavin Wahl 71767431eb Django 1.6 support
CHUNK_SIZE has been removed from Django, so set it ourself if it can't
be imported.
2013-05-24 15:13:34 -06:00
Tomas Peterka cbf52a61af Porting to Python 3.2
Removed compatibility_tools (because we aim to Python 2.7 and Python 3.2)
Performed 2to3 and modified
Usage of django.utils.six which adds dependency on Django >= 1.4.2
2013-05-20 16:03:21 +02:00
Diederik van der Boor 8cf313335c Handle stale ContentType models (no longer referring to a model)
This builds on top of a fix in Django 1.6, and has a workaround for
Django 1.4 and 1.5. When the base class points to a model that no longer
exists, it will be silently dropped in the polymorphic queryset results.

This behavior is identical to iterating over results when the derived
table doesn't have the object anymore.
2013-05-19 14:35:29 +02:00
Adam Wentz 04dce421e5 Fixes PolymorphicQuerySet for django 1.6
QuerySet.dup_select_related has been removed.
2013-04-08 00:35:22 +02:00
Diederik van der Boor bb0a4daddc Optimize transmogrify() function, assign __class__ instead. 2013-04-08 00:32:06 +02:00
Jedediah Smith 1a6f3a45e5 Handle non-distinct results from base object query 2013-04-08 00:32:06 +02:00
Diederik van der Boor ea9cb91e78 Rename variables in polymorphic/query.py for clarity
(split from previous commit by @jedediah)
2013-04-08 00:32:06 +02:00
Jedediah Smith 58c4f6f697 Optimization - don't do extra queries for proxy models 2013-04-08 00:05:21 +02:00