clokep / django-querysetsequence

Chain multiple (disparate) QuerySets in Django
https://django-querysetsequence.readthedocs.io/
ISC License
107 stars 25 forks source link

Add get_queryset method to expose QuerySet objects #53

Closed optiz0r closed 5 years ago

optiz0r commented 5 years ago

Downstream projects desire the ability to retrieve the individual QuerySet objects which form the QuerySetSequence. This commit adds a new get_querysets method as part of a stable public API to return the list of QuerySet objects that the sequence object is currently wrapping.

Tests and documentation updates are present, noting some of the caveats around this method. Notably, the component querysets will differ from those used to construct the original QuerySetSequence object if methods have been invoked which modify the sequence. Also that the order in which the QuerySet objects are returned is not guaranteed to be constant.

Fixes #21

optiz0r commented 5 years ago

Awesome, thank you! :)

clokep commented 5 years ago

I'll probably do a release once the other PR is merged #52.

jpic commented 5 years ago

Thank you very much @clokep, however, is it possible to make a minor release meanwhile #52 is merged ? That would be really nice, we've been struggling with this for a while :joy:

clokep commented 5 years ago

@jpic I plan to do a release soon, I was on vacation for a couple weeks and didn't get around to doing it beforehand. I'll try to do it this week.

jpic commented 5 years ago

Awesome thank you so much, I didn't see I had broken master in DAL by merging the patch.