title: How to obtain dicts key and values in Django template?
body: <p>I have a dictionary:</p>
  
  <pre><code>{'m': 'm', 'c': None, 's': None, 'n': None, 'a': 'a', 'x': None, 'b': None, 'l': None, 'u': None, 'o': 'o', 'q': None, 'i': None, 'f': None, 'z': None, 'e': None, 't': 't', 'h': None, 'y': None, 'v': None, 'p': None, 'k': None, 'g': None}
  </code></pre>
  
  <p>I'd like to hand the key value pairs that have the value None differently than the key value pairs that have the letters.</p>
  
  <p>Heres what I have so far for the template</p>
  
  <pre><code>&lt;table align="center" cellpadding="4px"&gt;
              &lt;tr&gt;
             {% for key, value in index_display.items %}
                 {% if index_display[key] = None %}
                      &lt;td&gt;&lt;a href=""&gt;{{ key }}&lt;/a&gt;&lt;/td&gt;
                      &lt;td id="partners_nav_bracket"&gt;|&lt;/td&gt;
                  {% else %}
                      &lt;td&gt;&lt;a href="{{ value }}"&gt;{{ key }}&lt;/a&gt;&lt;/td&gt;
                      &lt;td id="partners_nav_bracket"&gt;|&lt;/td&gt;
                  {% endif %}
              {% endfor %}
          &lt;/tr&gt;
     &lt;/table&gt;
  </code></pre>
  
  <p>This however throw an error:</p>
  
  <pre><code>Could not parse the remainder: '()' from 'index_display.key()'
  </code></pre>