title: How can I pass values/parameters from HTML to Django Views?
body: <p>I would usually do this in ajax I think. </p>
  
  <p>But if for example I have a button and a search input box that will have a query value, how can I pass the search value <em>(and possibly multiple values/parameters that is not obtained through a form field)</em> to Django views on button click to the url?</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code> &lt;div&gt;
      &lt;input id="search" name="search" type="text" class="query-search" placeholder="Search..."&gt;
      &lt;a class="btn btn-primary btn-lg btn-space col-sm-3" href="{% url 'routes_view' %}"&gt;View Routes&lt;/a&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p><strong>Views</strong></p>
  
  <pre><code>def view_detail(request): 
     ...
     &lt;How to get values from HTML without using ajax? Or its the only way?&gt;
  </code></pre>
  
  <p><strong>URLs</strong></p>
  
  <pre><code>url(r'^view/', views.view_detail, name='view_detail')
  </code></pre>