title: How to access getlist items in django?
body: <p>This is my template :</p>
  <pre><code>{% for pr in productlist %}
  
  &lt;ul name=&quot;myList&quot;&gt;
    &lt;li&gt;{{ pr.productname }} &lt;input type=&quot;hidden&quot; name=&quot;mylist&quot; id=&quot;prname&quot; value=&quot;{{ pr.productname }}&quot;&gt;&lt;/li&gt;
    &lt;li&gt;&lt;input type=&quot;number&quot; name=&quot;mylist&quot; id=&quot;prnumber&quot;/&gt;&lt;/li&gt;
  &lt;/ul&gt;
  
  {endfor}
  </code></pre>
  <p>in this list i have items or more. i using getlist() method and can print items in view. here is my view :</p>
  <pre><code>data = request.POST.getlist(&quot;mylist&quot;)
  for item in (data)):
       print (item)
  </code></pre>
  <p>result is :</p>
  <pre><code> product1
   1
  
   product2
   6
  
   product3
   4
  </code></pre>
  <p>but when try to print item.prnumber it raise error. like:</p>
  <pre><code> data = request.POST.getlist(&quot;mylist&quot;)
   for item in (data)):
       print (item.prnumber)
  </code></pre>
  <p><strong>how i can print just numbers?</strong></p>