title: How to convert Response type to suitable format for Html file?
body: <p>I am writing a method in flask app. I <code>get</code> data from <code>http://localhost:5000/product</code> and return response as <code>text</code> . code of this method is:</p>
  
  <pre><code>import requests
  
  
  @app.route('/product')
  def product():
      info = requests.get('http://localhost:5000/product') 
      return info.text
  </code></pre>
  
  <p>output of this method is:</p>
  
  <pre><code>[ { "P_ID": 1, "active": true, "count": 100, "price": 1000, "title": "product1" },
    { "P_ID": 2, "active": false, "count": 12, "price": 2500, "title": "Product2" } ]
  </code></pre>
  
  <p>Now, I want to use these data in <code>html</code> file. I have a table in <code>html</code> file with columns <code>P_ID</code>,<code>title</code>,<code>count</code>,<code>price</code> and <code>active</code>.I want to put these data to this table but I don't know how do I it. I changed this method as below but it don't work correctly.</p>
  
  <p>When I run using <code>python app.py</code> , I see integer numbers in columns of table but I wouldn't see information of <code>info</code> in table. When I use <code>product.title</code> or <code>product["title"]</code> in <code>product.html</code>file, I will see <code>&lt;built-in method title of str object at 0x018311C0&gt;</code> in title column of table.</p>
  
  <pre><code>import requests
  from flask import render_template
  
  
  @app.route('/product')
  def product():
      info = requests.get('http://localhost:5000/product') 
      info = info.text
      return render_template('product.html', info=info)
  </code></pre>
  
  <p><code>product.html</code> file is:</p>
  
  <pre><code>{% block body %}
  &lt;body&gt;
  &lt;h1&gt;Products List&lt;/h1&gt;
  
  &lt;table  style="text-align: center" width="15%" border="3px" bgcolor="#FFE4E1"&gt;
      &lt;tr&gt;&lt;td&gt;&lt;a href='/add'&gt;Add New Product&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;table style="text-align: center" width="50%" align="left" border= "3px solid black" border- 
  collapse= collapse bgcolor="#E0FFFF"&gt;
      &lt;tr&gt;
          &lt;th&gt; ID &lt;/th&gt;
          &lt;th&gt; Title &lt;/th&gt;
          &lt;th&gt; Count &lt;/th&gt;
          &lt;th&gt; Price &lt;/th&gt;
          &lt;th&gt; Active &lt;/th&gt;
          &lt;th&gt; Actions &lt;/th&gt;
     &lt;/tr&gt;
      {% for product in info %}
     &lt;tr&gt;
          &lt;td&gt; {{product[0]}} &lt;/td&gt;
          &lt;td&gt; {{product[1]}} &lt;/td&gt;
          &lt;td&gt; {{product[2]}} &lt;/td&gt;
          &lt;td&gt; {{product[3]}} &lt;/td&gt;
          &lt;td&gt; {{product[4]}} &lt;/td&gt;
          &lt;td&gt; &lt;a href='/edit/{{product[0]}}'&gt;Edit&lt;/a&gt; 
          &lt;a href='/delete/{{product[0]}}' onclick="return confirm('Are You Sure To Delete?')"&gt;Delete&lt;/a&gt; &lt;/td&gt;
  
       &lt;/tr&gt;
      {% endfor %}
   &lt;/table&gt;
   &lt;/body&gt;
   {% endblock %}
  </code></pre>
  
  <p>Can you help me?</p>