Open mauroka opened 7 years ago
@mauroka I don't have any plans to implement distinct()
at the moment, it's not needed for my application. I could definitely set aside time to offer guidance and review a pull request implementing this though!
The real downside is that there probably isn't a sane implementation besides just caching all the results, which makes it incompatible with e.g. iterator()
.
Hello @clokep, thanks for the response. Let me see if I can manage myself with an implementation without using distinct(). In case I require it, I will implement distinct() with your help. Thanks a lot. Mauro.
Sounds great! Let me know if you have more questions.
@mauroka how did you fix the querysetsequence so that it doesn't use distinct?
@sanjeevjohal It probably depends on your specific application. I suspect this would be easier to implement now that the internals of QuerySetSequence
are much simpler.
@clokep I'm using it within an admin class where I've overridden the get_queryset method and when i use the ModelAdmin.list_filter I get this error or any other not implemented attribute (e.g when I try to use the date_heirarchy i get the aggregate attribute not supported).
Any help will be greatly appreciated. Many thanks.
PS. I'm a relatively new to Django and learning every day 😄
@sanjeevjohal I modified django-datatable-view, not django-querysetsequence. Right now I'm migrating to this component https://bitbucket.org/pigletto/django-datatables-view-example/
Thanks @mauroka.
@clokep I should add I'm still on v1.8 and have no plans to upgrade to v1.11 where you can now combine querysets using a union. I did try to use the set operator | but this didn't give me a union which I understand removes duplicates even after I deliberately made an attribute in both models different
Hello, I'm trying to integrate django-querysetsequence with django-datatable-view (https://github.com/pivotal-energy-solutions/django-datatable-view)
When this component executes a search a NotImplementedError: QuerySetSequence does not implement distinct() error arrises.
So I would like to know if you plan to implement distinct in the future.
By the way, I fix it so when I use querysetsequence it doesn't use distinct, but of course, there are some duplicated results.
Thanks a lot for the help. Mauro.