title: Calling values from a dictionary (Django)
body: <p>I am fairly new to Django and I am having trouble getting values to load into the HTML from the dictionary generated in the <code>models.py</code> that looks like this:</p>
  
  <pre><code>&gt;&gt;&gt; generic_id = Generic.objects.get(pk=127)
  &gt;&gt;&gt; dict = generic_id._get_dict()
  &gt;&gt;&gt; dict  
  [{'field__name':'key1', 'value_char':'value1a', 'value_num':'value1'},{'field__name':'key2', 'value_char':'value2a', 'value_num':'value2'},{'field__name':'key3', 'value_char':'value3a', 'value_num':'value3'},{'field__name':'key4', 'value_char':'value4a', 'value_num':'value4'}]
  &gt;&gt;&gt; dict[2]['value_num']  
  Decimal('value2')
  &gt;&gt;&gt; dict[3]['value_char']
  'value3a'
  </code></pre>
  
  <p>The HTML table looks like this:</p>
  
  <pre><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;td&gt;Description1&lt;/td&gt;&lt;td&gt;{{value1}}&lt;/td&gt;
      &lt;td&gt;Description2&lt;/td&gt;&lt;td&gt;{{value2}}&lt;/td&gt;
      &lt;td&gt;Description3&lt;/td&gt;&lt;td&gt;{{value3a}}&lt;/td&gt;
      &lt;td&gt;Description4&lt;/td&gt;&lt;td&gt;{{value4}}&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Name: {{ generic.name }}&lt;/td&gt;
      &lt;td&gt;E-mail: {{ generic.email }}&lt;/td&gt;
      &lt;td&gt;State: {{ generic.state }}
  &lt;/table&gt;
  </code></pre>
  
  <p>The code in the <code>views.py</code> right now looks like this:  </p>
  
  <pre><code>def query_test(request, generic_id):
      try:
          a = Generic_table.objects.get(pk=generic_id)
      except Generic_table.DoesNotExist:
          raise Http404
      t = loader.get_template('query_test.html')
      c = RequestContext(request, {
               'generic' : a, })
      return HttpResponse(t.render(c))
  </code></pre>
  
  <p>Can someone give me some suggestions as to how to (and efficiently) get the appropriate values from the dictionary into the generated HTML?</p>