Commit graph

1045 commits

Author SHA1 Message Date
Laura Klünder
9ba14677c0 Revert commits about evaluating the queryset at the end.
This reverts commit a0a17c3630985fe960211708f5b90acf449f76b3.
This reverts commit 92122270e5815cbbf301a6e247c682a05717b19d.
This reverts commit c5d4c4d347e99be00258d55ec6338e3749084bbe.
This reverts commit c78876087d29511b6126132a213f4267249a869f.
2017-06-16 11:50:24 +02:00
Laura Klünder
e187e1ef67 when queueing a filter command cast iterables of __in values to tuples 2017-06-16 10:15:28 +02:00
Laura Klünder
8b8dd06660 execute query commands always to get exceptions if they are not valid 2017-06-15 18:29:09 +02:00
Laura Klünder
c6247aca19 cache executed WrappedQuerySets 2017-06-15 18:04:43 +02:00
Laura Klünder
a6d117d490 add cache_key to ChangeSet 2017-06-15 17:53:00 +02:00
Laura Klünder
52404c1cf1 query should only be evaluated at the end 2017-06-15 17:36:35 +02:00
Laura Klünder
13bd8f24af remove debug statements 2017-06-15 12:52:28 +02:00
Laura Klünder
33af5c5444 add another NotImplementedError 2017-06-15 12:51:34 +02:00
Laura Klünder
dfdc348423 easier way to get the field of a ForwardManyToOneDescriptor 2017-06-15 01:41:08 +02:00
Laura Klünder
aa0843fb24 support for reverse manytomany lookups in QuerySetsWrapper 2017-06-15 01:40:46 +02:00
Laura Klünder
de930722cb use pk instead of id so it works with wrapped QuerySets 2017-06-15 01:39:33 +02:00
Laura Klünder
e6c861a609 remove old unreachable code 2017-06-15 01:21:24 +02:00
Laura Klünder
fb523756ea fix error when fetching on QuerySetWrapper 2017-06-15 01:19:25 +02:00
Laura Klünder
5d783e86c4 more filter features 2017-06-15 01:11:55 +02:00
Laura Klünder
5f40d7024d more WrappedQuerySet filter features 2017-06-15 00:53:40 +02:00
Laura Klünder
0923e6886a RelatedManagerWrapper should operate completely on wrapped queryset 2017-06-15 00:53:20 +02:00
Laura Klünder
4a1b4dd88c fix wrap_instances 2017-06-15 00:48:08 +02:00
Laura Klünder
12a86ee0ce send wrapped_querysets dont wrap their results into prefetch_related 2017-06-15 00:32:41 +02:00
Laura Klünder
4a2b638bbe fix reading prefetch cache in RelatedManagerWrapper.all() 2017-06-15 00:17:43 +02:00
Laura Klünder
c93240eca7 implement first filter updates for existing objects 2017-06-15 00:07:19 +02:00
Laura Klünder
cc8b4510a2 QuerySetWrapper.exclude() 2017-06-14 17:02:53 +02:00
Laura Klünder
4ca93dd817 prepare to manipulate filter arguments 2017-06-14 16:59:09 +02:00
Laura Klünder
d0de6962b4 support for created objects in _parse_change 2017-06-14 02:19:37 +02:00
Laura Klünder
a48ec42b9f s/filter/filter_/ dont use name of built in function as variable name 2017-06-14 02:05:04 +02:00
Laura Klünder
f33dd80781 add type hinting so pycharm does not get confused 2017-06-14 02:04:03 +02:00
Laura Klünder
0a8c7cf87a QuerySetWrapper.iterator() should call QuerySet.iterator() 2017-06-14 01:42:56 +02:00
Laura Klünder
0d6e1a237f QuerySetWrapper.__iter__() should use generators 2017-06-14 01:41:37 +02:00
Laura Klünder
f57a5697f8 fix double wrapping of querysets 2017-06-14 01:41:20 +02:00
Laura Klünder
fba5025550 respect changes in manytomany.all() lookup 2017-06-14 01:18:42 +02:00
Laura Klünder
73a7345584 set parsed to True, otherwise it's useless 2017-06-14 01:11:49 +02:00
Laura Klünder
4a6b589963 _parse_change for all changes about existing objects 2017-06-14 00:51:55 +02:00
Laura Klünder
1b8116fe7d add BaseQueryWrapper.get_queryset() to exclude deleted object 2017-06-14 00:34:46 +02:00
Laura Klünder
e28ef3a112 fix button label in list.html 2017-06-13 23:46:55 +02:00
Laura Klünder
1f76905384 fix invalid call of delattr 2017-06-13 23:43:00 +02:00
Laura Klünder
9277c32afc correctly process relation updates in ModelInstanceWrapper 2017-06-13 23:38:56 +02:00
Laura Klünder
5b3d6ffbc4 avoid unnecessary queries in ModelInstanceWrapper.save 2017-06-13 23:31:37 +02:00
Laura Klünder
d3ffbd55cd don't cause unnecessary queries for initial_values 2017-06-13 23:13:28 +02:00
Laura Klünder
c2382c7a3b catch _prefetched_objects_cache AttributeError 2017-06-13 22:39:30 +02:00
Laura Klünder
bbfa6ac8c1 fix prefetch_related again 2017-06-13 22:32:58 +02:00
Laura Klünder
38baebb536 don't break prefetch_related 2017-06-13 22:07:36 +02:00
Laura Klünder
3e36f5b7a3 fix comparing wrapped model instances 2017-06-13 18:58:48 +02:00
Laura Klünder
e3c8947883 do creepy metaclass stuff in wrappers.py 2017-06-13 18:52:16 +02:00
Laura Klünder
da9a7c5130 instances of queryset should also be wrapped 2017-06-13 17:40:35 +02:00
Laura Klünder
3609420d8e implement BaseQueryWrapper.prefetch_related 2017-06-13 17:03:16 +02:00
Laura Klünder
2ae30613dc exclude deleted existing objects according to changes 2017-06-13 16:36:18 +02:00
Laura Klünder
18174c373a call _parse_change in _new_change 2017-06-13 16:25:01 +02:00
Laura Klünder
c07a2f1ab5 remove debug output 2017-06-13 16:24:41 +02:00
Laura Klünder
ef5764305f ChangeSet: call parse_change only when needed 2017-06-13 16:22:59 +02:00
Laura Klünder
164fe5d892 update wrapped models according to changeset 2017-06-13 16:15:28 +02:00
Laura Klünder
fb91af07e0 dont pushState onpopstate 2017-06-13 15:39:06 +02:00