title: Displaying list on HTML page from view in Django
body: <p>I've got a list in my views.py which I'm sending to a HTML page via the render function and I'm printing it out on that page. Problem is that, while all other lists that I send are getting printed on the HTML page, these 2 lists I'm sending in particular are not.</p>
  
  <p><strong>app/views.py</strong></p>
  
  <pre><code>alttrue = []
  altfalse = []
  alttrue, altfalse = altCheck(soup)
  results = { 'alttrue' : alttrue,
              'altfalse' : altfalse,
            }
  render(context,'app/result.html', results)
  </code></pre>
  
  <p>Now altCheck is a function that returns two lists where at least one of them have values, that's for sure. In my result.html,</p>
  
  <p><strong>results.html</strong></p>
  
  <pre><code>&lt;h5&gt;Alt pass results&lt;/h5&gt;
  {% for tag in alttrue %}
  &lt;p&gt;{{ tag }}&lt;/p&gt;
  {% endfor %}
  &lt;h5&gt;Alt fail results&lt;/h5&gt;
  {% for tag in altfalse %}
  &lt;p&gt;{{ tag }} &lt;/p&gt;
  {% endfor %}
  </code></pre>
  
  <p>The problem is that running a for loop through the list and trying to print it, returns an empty list ([]). However, If I were to try and print it as such</p>
  
  <pre><code>&lt;p&gt;{{ alttrue }}&lt;/p&gt;
  &lt;p&gt;{{ altfalse }}&lt;/p&gt;
  </code></pre>
  
  <p>It works fine. It prints the list. Just, iterating the list and printing out the variables doesn't work. </p>