title: How to make buttons visible/invisible based on values in passed dictionary to tornado template?
body: <p>How to make buttons visible/invisible based on values in passed dictionary to template ?</p>
  
  <pre><code>self.render('menu.html',menu=menu)
  </code></pre>
  
  <p>where menu is passed like </p>
  
  <pre><code>menu = {'attack': False, 'intercept': False, 'follow': False, 'go': False, 'enter_village': False, 'send_backup': False, 'safe_zone': False}
  </code></pre>
  
  <p>and in template I have </p>
  
  <pre><code>    &lt;div class="ui-grid-b"&gt;
  
          &lt;div data-role="button" id="attack" {% if {{menu['attack']}} %}
               style='display:block;'{% else %}style='display:none;'{% end %}  &gt;Attack&lt;/div&gt;
          &lt;div data-role="button" id="intercept"&gt;Intercept&lt;/div&gt;
          &lt;div data-role="button" id="follow"&gt;Follow&lt;/div&gt;
          &lt;div data-role="button" id="go"&gt;Go&lt;/div&gt;
          &lt;div data-role="button" id="enter_village"&gt;Enter Village&lt;/div&gt;
          &lt;div data-role="button" id="send_backup"&gt;Send Backup&lt;/div&gt;
  
      &lt;/div&gt;
  </code></pre>
  
  <p>and it doesn't work ( TypeError: unhashable type: 'set'), when I change to {{menu.attack}} I get error no key attack in dict ( but I passed that values and dict, I've debug to render point).</p>