Hi,
Just trying to get my head around what is and isn't supported, the use case I'm after would be something like an Author with many Books, and writing a spec to show the author and the top 5 books by some ordering criteria.
I tried a couple of approaches to no avail:
- I wrote a
slice pair which used QuerySet.__getitem__ to mimic slicing, but I think that won't work in general if there are other filters to be applied to the overall queryset
- An annotation using
row_number also did not work because one cannot filter on a window function
Let me know if you would prefer questions to be asked on a different platform.
Thanks for the library.
Hi,
Just trying to get my head around what is and isn't supported, the use case I'm after would be something like an
Authorwith manyBooks, and writing a spec to show the author and the top 5 books by some ordering criteria.I tried a couple of approaches to no avail:
slicepair which usedQuerySet.__getitem__to mimic slicing, but I think that won't work in general if there are other filters to be applied to the overall querysetrow_numberalso did not work because one cannot filter on a window functionLet me know if you would prefer questions to be asked on a different platform.
Thanks for the library.