clokep / django-querysetsequence

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

Add support for Django 1.11 (and master) #26

Closed clokep closed 7 years ago

clokep commented 7 years ago

This adds support for Django 1.11 and master by adapting to new APIs.

clokep commented 7 years ago

This still has a couple of failing tests I'm working through.

blueyed commented 7 years ago

Nice! Have you made additional progress on it already? / What is the state of this?

clokep commented 7 years ago

@blueyed I haven't had a chance to look into this more, although I suspect you might be able to replace this with union() method in Django 1.11, let me know if you try that out!

clokep commented 7 years ago

I should also mention that I've been unable to figure out the couple of tests that are failing -- the reason is not obvious and I've been unable to reduce the test-case farther to figure out what's wrong. If you have a chance to look, I'd love some more eyes on it!

blueyed commented 7 years ago

@clokep Thanks for the update! I have not tried union() but just came across this with the last test failures we have for Django 1.11.

We're basically using it for/with https://github.com/yourlabs/django-autocomplete-light, but in custom ways also.

I could make our tests passing using this branch, but those are very basic.

michael-k commented 7 years ago

The main limitation of union() is:

Passing different models works as long as the SELECT list is the same in all QuerySets (at least the types, the names don’t matter as long as the types in the same order).

clokep commented 7 years ago

@michael-k Right, but it's a lot less hacky then this. If you can use it, I'd highly suggest using that instead.

clokep commented 7 years ago

I think this is ready to go, if tests pass!

clokep commented 7 years ago

Just pushed version 0.8 to pypi.