For example, if i had to select specific ids I can do this using:
id_list=[1,4,7]
Blog.objects.filter(pk__in=id_list)
But the problem is id_list
is being populated using filters selected in front end.
so initially id_list
will be empty(id_list=[]
)
so, is there a way to select all the ids using Blog.objects.filter(pk__in=id_list)
when id_list
is empty?