Is there a way to inspect a queryset and get info about which filters/exclude have been applied?
I need it for debugging: I cannot understand why my queryset excludes some data...
You can use also:
your_qs.query.where.children
or:
your_qs._has_filters().__dict__['children']
and to access to the first filter that you applied:
your_qs._has_filters().__dict__['children'][0].__dict__
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With