title: How to get key value in django template?
body: <p>Django template system - how to get python dictionary value from key?</p>
  
  <p>I have two dictionaries which represent different data but both have same key so that I am able to access different data from the same key. </p>
  
  <p>First dict is:</p>
  
  <pre><code>{**'Papa, Joey C'**: {'Office Visit Est Pt Level 3 (99213)': 32, 'LAP VENTABD HERNIA
   REPAIR (49652)': 2, 'INSERT TUNNELED CV CATH (36561)': 4, 'Office Visit New Pt
  Level 2 (99202)': 4, 'PUNCTURE/CLEAR LUNG (32420)': 1, 'REPAIR SUPERFICIAL WOUND
  S (12011)': 1, 'DEBRIDE SKINTISSUE (11042)': 29, 'Office Visit New Pt Level 3 (9
  9203)': 11, 'IDENTIFY SENTINEL NODE (38792)': 2, 'MAST MOD RAD (19307)': 1, 'EXC
   FACE LES SC &lt; 2 CM (21011)': 1, 'ACTIVE WOUND CARE20 CM OR (97597)': 4, 'RPR UM
  BIL HERN, REDUC &gt; 5 YR (49585)': 3, 'REMOVE LESION BACK OR FLANK (21930)': 2}}
  </code></pre>
  
  <p>Second dictionary is:</p>
  
  <pre><code> {**'Papa, Joey C'**: {'10140': 1, '10061': 1, '99214': 1, '99215': 1, '12011': 1, '97606': 1, '49080': 1, '10120': 1, '49440': 1, '49570': 1}, 'Bull, Sherman M': {'99211': 1, '99214': 1, '99215': 1, '99231': 1, '99236': 1, '12051': 1, '15004':1, '47100': 1, '15430': 1, '15431': 1}} 
  </code></pre>
  
  <p>On django template, I am using...</p>
  
  <pre><code>{% for key1,value1 in mydict.items %}
  &lt;br&gt;&lt;br&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;table border="1"&gt;&lt;tr&gt;&lt;td&gt;Provider Name&lt;/td&gt;&lt;td width="70%"&gt;{{key1}}&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;table class="report_by_provider"&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;CPT Discription&lt;/th&gt;&lt;th&gt;Total&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
  &lt;tbody&gt;
  {% for key2,val2 in value1.items %}
  &lt;tr&gt;
  &lt;td&gt;{{key2}}&lt;/td&gt;
  &lt;td&gt;{{val2}}&lt;/td&gt;
  &lt;/tr&gt;
  {% endfor %}
  &lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;table class="report_by_provider"&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;CPT Code&lt;/th&gt;&lt;th&gt;CPT Discription&lt;/th&gt;&lt;th&gt;Vol&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
  &lt;tbody&gt;
  
  {% for key3,val3 in mydict1.key1%}
  {% for key,val in val3.items %}
  &lt;tr&gt;
  &lt;td&gt;{{key1}}&lt;/td&gt;
  &lt;td&gt;{{val}}&lt;/td&gt;
  &lt;td&gt;{{val}}&lt;/td&gt;
  &lt;/tr&gt;
  {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>But the second dictionary is not printing.</p>