Templates need access to both ancestors and descendants of a category, and ideally both including the category itself or not. Previously, get_ancestors used to default to including the category itself, which required slicing in templates. Also, get_ancestors is a treebeard function and I wouldn't bet that it doesn't interact with treebeard logic. Now, the two treebeard functions get_ancestors and get_descendants return a queryset, and get_[ancestors|descendants]_and_itself return a list that includes the category itself.master
|
||
330 | 330 |
|
331 | 331 |
|
332 | 332 |
|
333 |
|
|
334 |
|
|
335 |
|
|
336 |
|
|
337 |
|
|
333 | 338 |
|
334 | 339 |
|
335 | 340 |
|
|
||
149 | 149 |
|
150 | 150 |
|
151 | 151 |
|
152 |
|
|
153 |
|
|
154 |
|
|
155 |
|
|
156 |
|
|
152 |
|
|
153 |
|
|
154 |
|
|
155 |
|
|
156 |
|
|
157 |
|
|
158 |
|
|
159 |
|
|
160 |
|
|
161 |
|
|
162 |
|
|
163 |
|
|
164 |
|
|
165 |
|
|
166 |
|
|
157 | 167 |
|
158 | 168 |
|
159 | 169 |
|
|
||
121 | 121 |
|
122 | 122 |
|
123 | 123 |
|
124 |
|
|
125 |
|
|
126 |
|
|
124 |
|
|
127 | 125 |
|
128 | 126 |
|
129 | 127 |
|
|
||
196 | 194 |
|
197 | 195 |
|
198 | 196 |
|
199 |
|
|
197 |
|
|
200 | 198 |
|
201 | 199 |
|
202 | 200 |
|
|
||
403 | 403 |
|
404 | 404 |
|
405 | 405 |
|
406 |
|
|
406 |
|
|
407 | 407 |
|
408 | 408 |
|
409 | 409 |
|
|
||
24 | 24 |
|
25 | 25 |
|
26 | 26 |
|
27 |
|
|
27 |
|
|
28 | 28 |
|
29 | 29 |
|
30 | 30 |
|
|
||
24 | 24 |
|
25 | 25 |
|
26 | 26 |
|
27 |
|
|
27 |
|
|
28 | 28 |
|
29 | 29 |
|
30 | 30 |
|
|
||
24 | 24 |
|
25 | 25 |
|
26 | 26 |
|
27 |
|
|
27 |
|
|
28 | 28 |
|
29 | 29 |
|
30 | 30 |
|
|
||
12 | 12 |
|
13 | 13 |
|
14 | 14 |
|
15 |
|
|
15 |
|
|
16 | 16 |
|
17 | 17 |
|
18 | 18 |
|
|
||
14 | 14 |
|
15 | 15 |
|
16 | 16 |
|
17 |
|
|
17 |
|
|
18 | 18 |
|
19 | 19 |
|
20 | 20 |
|