title: Iterating though Dictionary values is not working for me in Django on GAE
body: <p>Data is a sorted Dict from <code>django.utils.datastructures import SortedDict</code></p>
  
  <pre><code>{'test1': '-10', 'quiz1': '65', 'quiz2': '40', 'quiz3': '55'}
  </code></pre>
  
  <p>This Template Code:</p>
  
  <pre><code>{% for key1 in Data %}
         &lt;td&gt;key: {{ key1|capfirst }} - value: {{Data.key1}} - Data: {{ Data }}&lt;/td&gt;
  {% endfor %}
  </code></pre>
  
  <p>Yields:</p>
  
  <pre><code>key: Quiz1 - value: - Data: {'test1': '-10', 'quiz1': '65', 'quiz2': '40', 'quiz3': '55'}
  
  key: Quiz2 - value: - Data: {'test1': '-10', 'quiz1': '65', 'quiz2': '40', 'quiz3': '55'}
  
  key: Quiz3 - value: - Data: {'test1': '-10', 'quiz1': '65', 'quiz2': '40', 'quiz3': '55'}
  
  key: Test1 - value: - Data: {'test1': '-10', 'quiz1': '65', 'quiz2': '40', 'quiz3': '55'}
  </code></pre>
  
  <p>I've tried the different examples in the Doc, but I'm stuck.</p>
  
  <p>EDIT:</p>
  
  <p>I tried this Code:</p>
  
  <pre><code>&lt;table border="1"&gt;
  &lt;tr&gt;
      {% for key1 in Data %}
          &lt;td&gt;{{ key1|capfirst }}&lt;/td&gt;
      {% endfor %}
  &lt;/tr&gt;
  &lt;tr&gt;
      {% for key2 in Data %}
          &lt;td&gt;key: {{ key2|capfirst }}| Data: {{Data.key2}}| Static Keyed: {{ Data.quiz1 }}| AllData: {{ Data }}&lt;/td&gt;
      {% endfor %}
  &lt;/tr&gt;
  &lt;tr&gt;
      {% for key,value in Data %}
          &lt;td&gt;key: {{key}}: value: {{value}}&lt;/td&gt;
      {% endfor %}
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>and this is the result:</p>
  
  <pre><code>&lt;table border="1"&gt;
  &lt;tr&gt;
          &lt;td&gt;Quiz1&lt;/td&gt;
          &lt;td&gt;Quiz2&lt;/td&gt;
          &lt;td&gt;Quiz3&lt;/td&gt;
          &lt;td&gt;Test1&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;key: Quiz1| Data: | Static Keyed: 65| AllData: {'test1': '56', 'quiz1': '65', 'quiz2': '75', 'quiz3': '25'}&lt;/td&gt;
      &lt;td&gt;key: Quiz2| Data: | Static Keyed: 65| AllData: {'test1': '56', 'quiz1': '65', 'quiz2': '75', 'quiz3': '25'}&lt;/td&gt;
      &lt;td&gt;key: Quiz3| Data: | Static Keyed: 65| AllData: {'test1': '56', 'quiz1': '65', 'quiz2': '75', 'quiz3': '25'}&lt;/td&gt;
      &lt;td&gt;key: Test1| Data: | Static Keyed: 65| AllData: {'test1': '56', 'quiz1': '65', 'quiz2': '75', 'quiz3': '25'}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;key: : value: &lt;/td&gt;
      &lt;td&gt;key: : value: &lt;/td&gt;
      &lt;td&gt;key: : value: &lt;/td&gt;
      &lt;td&gt;key: : value: &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt; 
  </code></pre>
  
  <p>The Data is there, but django won't let me use a variable as a key. My problem is that I want the table to grow dynamically with a changing number of test/grade pairs passed to it. Is this normal?</p>
  
  <p>EDIT: </p>
  
  <p>It turns out that I am using a different version of django than I thought i was using. This code will do what I am trying to do in version 0.96 of django:</p>
  
  <pre><code>&lt;tr&gt;
  {% for data in Data.items %} 
      &lt;td&gt;{{data.0}}: {{data.1}}&lt;/td&gt;
  {% endfor %}
  &lt;/tr&gt;
  </code></pre>
  
  <p>Thanks to everyone that helped, even though I initially gave the wrong info.</p>