I have an object variable obj
. Is it possible to check whether its a Queryset or not?
(Couldn't find any posts on this on searching)
You can use python built-in function isinstance.
from django.db.models.query import QuerySet isinstance(your_qs, QuerySet)
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