My view is returning a dictionary.
**{'id': 1, 'user_info_id': 1, 'coding': False, 'testing': False, 'req_analysis': True}**
In Django template, I want to print all the keys of value == True. I have written the below code in Django template.
{% for key, value in db_data.0.items %}
{% if value == True %}
{{ key }}
{% endif %}
{% endfor %}
But, in output, I am getting key with value True as well as the keys with value 1.
O/P :
id
user_info_id
testing
I want output as "testing" only.
Can anyone please help me with this.