title: How to get input from template in view in django
body: <p>I know this question is too primitive but I'm totally new in web application development and I still haven't found an answer for it. When you want to receives some data from the user like the number of products the user wants to buy in a template like this:</p>
  
  <pre><code>form action="/pay/" method="POST"&gt;
      {% csrf_token %}
  
      &lt;label for="pid"&gt;Book ID&lt;/label&gt;  
      &lt;input type="text" name="pid" value={{pid}} /&gt;
      &lt;br/&gt;
      &lt;label for="sid"&gt;Seller ID&lt;/label&gt;
      &lt;input type="text" name="sid" value={{sid}} /&gt;
      &lt;br/&gt;    
      &lt;input type="hidden" name="success_url" value="http://localhost:8000/payment/success" /&gt;
      &lt;input type="hidden" name="cancel_url" value="http://localhost:8000/payment/cancel"  /&gt;
      &lt;input type="hidden" name="error_url" value="http://localhost:8000/payment/error"  /&gt;
      &lt;p&gt;Checksum test: {{checksum}}&lt;/p&gt;
      &lt;input type="text" name="checksum" value={{checksum}}/&gt;
      &lt;/br&gt;
      &lt;label for="id_amount"&gt;Please enter the number of products you would like to buy &lt;/label&gt;
      &lt;input type="text" id="id_amount" name="amount" value=""/&gt;
      &lt;input type="submit" value="Accept payment" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>how do you read that input in the view? For example, how can I print that input? </p>
  
  <p>My view is like this:</p>
  
  <pre><code>def get_payment_detail(request, pid, sid):    
      checksum = Payment().calc_checksum()   
      return render_to_response('payment/payment.html', RequestContext(request, {'pid':Payment.pid,
                          'sid':Payment.sid,
                          'amount':Payment.amount,
                          'checksum': checksum                     
                          }))
  </code></pre>