I have a django model with a boolean field named status
a normal query goes like:
MyModel.objects.filter(status=True)
but in some cases , I need to use this way:
fieldname = 'status'
MyModel.objects.filter(${fieldname}=True) # wrong syntax
how to write this. thanks