title: How to print dynamic content in Django template
body: <p>I am new to python and  django, Ian using paramiko module to get server cpu utilisation and I want to render that output  in my html template. I can print output for a single server in html .</p>
  
  <p>But I am not able to print multiple servers output in html template.</p>
  
  <p>Example:-
  I have 100 servers I want to get all the servers cpu utilisation once I logind in my webpage.</p>
  
  <p>I am using CSV file with hostname and IP.</p>
  
  <p>In my views.py i am using for looop to read ips in CSV file . By using paramiko module I am getting output .</p>
  
  <p>I am using below request.</p>
  
  <p>Views.py</p>
  
  <p>For loop</p>
  
  <pre><code>return render(request, 'personal/welcome.html', {'host':[hostname],'cpu':[cpu]} )
  </code></pre>
  
  <p>In my html template </p>
  
  <pre><code>{{host}} {{cpu}}
  </code></pre>
  
  <p>but I am able to print only last sever output which is last in CSV file.</p>
  
  <p>Please tell me is there any other way to print all servers output or can I save all server output in text file. and print it on same webpage.</p>
  
  <p>-----views.py</p>
  
  <pre><code>if user.is_active:
  # If the account is valid and active, we can log the user in.
  # We'll send the user back to the homepage.
  with open('E:\ips.csv') as csvfile:
      readCSV = csv.reader(csvfile, delimiter=',')
      print(readCSV)
  
      for row in readCSV:
          a = row[1]
          b = row[0]
          ip = a
          host=b
          ssh_client = paramiko.SSHClient()
          ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy)
          ssh_client.connect(ip, username='username', password='password)
          output = ""
          stdin, stdout, stderr = ssh_client.exec_command("uname")
          uname = stdout.readlines()
          ssh_client.close()
          for line in uname:
              output = output + line
              if output != "":
                  status="online"
              else:
                  status="offline"
      login(request, user)
      return render(request,'personal/welcome.html',{'status':[status])
  </code></pre>
  
  <p>------welcome.html</p>
  
  <pre><code>  &lt;i&gt;&lt;/i&gt; HOSTNAME &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IP_ADDR &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LIVE_STATUS &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RAM_FREE(GB)
  
                                    &lt;/address&gt;
                                &lt;/li&gt;
                            &lt;/ol&gt;
                              {% block content %}
                              {% for status in status %}
                                &lt;I&gt;&lt;/I&gt;{{status}}
                             {% endfor %}
                             % endblock %}
                              &lt;!--&lt;div id="morris-area-chart"&gt;&lt;/div&gt; --&gt;
  </code></pre>