This aligns the implementation of Oscar specific QuerySet Methods with the implementation in current django core[1]. While this is not DRY, it does deliver on chainability and can be seen as preparation to take advantage of the improvements coming to this part of django in 1.7 [2] The original motivation for this was that using a custom QuerySet while trying not to copy code from oscar felt too hard. [1] https://github.com/django/django/blob/1.6.2/django/db/models/manager.py#L123 [2] https://docs.djangoproject.com/en/dev/releases/1.7/#calling-custom-queryset-methods-from-the-manager Fixes #1278. Deprecation comments added by @maikhoepfelmaster
|
|
||
| 1 |
|
1 |
|
| 2 |
|
2 |
|
| 3 |
|
3 |
|
| 4 |
|
|
|
|
4 |
|
|
| 5 |
|
5 |
|
| 6 |
|
6 |
|
| 7 |
|
7 |
|
| 8 |
|
|
|
|
8 |
|
|
|
9 |
|
|
| 9 |
|
10 |
|
| 10 |
|
|
|
|
11 |
|
|
| 11 |
|
12 |
|
| 12 |
|
13 |
|
| 13 |
|
14 |
|
| 14 |
|
15 |
|
| 15 |
|
16 |
|
| 16 |
|
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
| 17 |
|
42 |
|
| 18 |
|
43 |
|
| 19 |
|
44 |
|
| 20 |
|
45 |
|
| 21 |
|
46 |
|
|
47 |
|
|
|
48 |
|
|
| 22 |
|
49 |
|
| 23 |
|
50 |
|
| 24 |
|
|
|
| 25 |
|
|
|
| 26 |
|
|
|
|
51 |
|
|
|
52 |
|