title: What is a more efficient way to pass variables from Template to View in Django?
body: <p>My question involves passing variables from the template to view in Django.</p>
  
  <p>I know of passing variables in the URL and through a form. The problem I have with the first one is that the url could be manipulated which is not what I want. Is there anyway to prevent that?</p>
  
  <p>Right now this is what I have as a band-aid:</p>
  
  <pre><code>&lt;form action="/match/" method="post"&gt;
  {% csrf_token %}
  
  &lt;input type="hidden" name="name1" value="{{ male_results }}"&gt;
  &lt;input type="hidden" name="userid1" value="{{ male_pic_userid }}"&gt;
  
  &lt;input type="hidden" name="name2" value="{{ female_results }}"&gt;
  &lt;input type="hidden" name="userid2" value="{{ female_pic_userid }}"&gt;
  
  &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>Is there a way to avoid having to use this? Thank you!</p>