Re: Feature requests for queryset

2022-04-05 Thread Laurent Lyaudet
Hello Jason, Thanks for your answer. First I apologize because my webmail removed all indentation from class EnhancedQuerySet: Thus it may not be easily understood without taking the time to reindent it. I created it here : https://djangosnippets.org/snippets/10867/ so that everyone can easily

Re: Feature requests for queryset

2022-04-04 Thread Jason Johns
filter takes in a decomposed dict of keys and values, ie filter_dict = { "id_in": SomeIterable } qs = SomeModel.objects.filter(**filter_dict) from your example, IGNORE_FILTER does not return an iterable, so how is that to work with a SQL query? Seems to me that ths might be an x-y

Feature requests for queryset

2022-04-04 Thread Laurent Lyaudet
Hello, Below are 2 feature requests : - the first would just be to add a constant object for ignoring some filters, to avoid lists of "if ... is not None: q = q.filter(...)" like I must do right now, q = q.filter(id_in=[1,2,3]) filters something q = q.filter(id_in=IGNORE_FILTER) does not filter -