How can I check if there is something in the dictionary in django template

django, python

Solution

{% if not dict.vars %}
  do this
{% endif %}

Problem

I have the dictionary which i am passing to the template like this ``` dict['vars'] = ['a':'dd','b':'gg','c':'yy'] dict['myvars'] = ['a':'tt','b':'yy','c':'uu'] ``` there are times when the individual dict are empty with no key. how can I check that like this ``` {% if dict.vars empty %} do this ```

Original source