title: How to show all dictionary in template in Django?
body: <p>I am working with IFC and I need to extract some data from a .ifc file to be displayed in the Django template.</p>
  <p>The template:</p>
  <pre><code>{% extends 'base.html' %}
  
  {% block content %}
      &lt;h2&gt;upload&lt;/h2&gt;
      &lt;form method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
      {% csrf_token %}
      &lt;input type=&quot;file&quot; name=&quot;document&quot;&gt;
      &lt;button type=&quot;submit&quot;&gt;Upload File&lt;/button&gt;
      &lt;/form&gt;
      &lt;br&gt;
      {{result}}
  {% endblock %}
  </code></pre>
  <p>I've tried two methods:</p>
  <pre><code>    OpenIfcFile = ifcopenshell.open(filepath) #select the file
      BrowseIfcProducts = OpenIfcFile.by_type('IfcElement') #search for the attribute 'IfcElement'
      for eachproduct in BrowseIfcProducts:
          #add the .ifc searched data to dict 'context' with 'result' key 
          context['result'] =
          [
              eachproduct.is_a(),
              eachproduct.GlobalId,
              eachproduct.get_info()[&quot;type&quot;],
              eachproduct.get_info().get(&quot;Name&quot;,&quot;error&quot;),
          ]
  return render(request, 'upload.html', context)
  </code></pre>
  <p>In this method, due the key 'result' doesn't change on each iteration, only the last item is stored and in my template i can't see all items.</p>
  <p>So, to fix this problem, I concatenate the result key to a iterator (i):</p>
  <pre><code>    i = 1
      for eachproduct in BrowseIfcProducts:    
          context['{} {}'.format('result', i)] = [
              eachproduct.is_a(), 
              eachproduct.GlobalId, 
              eachproduct.get_info()[&quot;type&quot;],
              eachproduct.get_info().get(&quot;Name&quot;,&quot;error&quot;),
          ]
          i += 1
  return render(request, 'upload.html', context)
  </code></pre>
  <p>But, unfortunately, nothing is displayed in the template</p>
  <p>I'm stuck here, i don't know how can I show the data on template, can someone help me?</p>