Lets say I have table that looks like this
col1 col2
1 completed
2 error
3 inititated
4 error
5 completed
6 error
7 completed
Now I have query in django that do like this:
Model.objects.filter(col1__in=[1,2,8]).values('col2')
This query is running fine but what i want is to do something like this: Return "pending" for col2 where col1 is not in above list i.e return "pending" for 8 as it is not in table and "completed" and "error" for 1 and 2