title: Pass <input> value to Django view
body: <p>Let's say I have the following pointless example view:</p>
  
  <pre><code>def foo(request, input):
      return HttpResponse()
  </code></pre>
  
  <p>and in a template I have a form:</p>
  
  <pre><code>&lt;form method="get" action="{% url 'foo' ??? %}"&gt;
      &lt;input id="myinput" type="text" name="myinput"&gt;
  
      ...
  
  &lt;/form&gt;
  </code></pre>
  
  <p>Finally, I have the following url in my URLconf:</p>
  
  <pre><code>urlpatterns = [
      url(r'^foo/(.+)/', views.foo, name='foo'),
  ]
  </code></pre>
  
  <p>What I would like to do, is pass the value entered by the user into the input with the id of <code>#myinput</code> to the <code>foo()</code> view function. To put it another way, you should be able to enter <code>bar</code> in the html input, and when you submit the form it will take you to <code>foo/bar/</code>.</p>
  
  <p>I know that within the foo view I could access the value of the input easily with <code>request.GET['myinput']</code>, but I want it to show up in the url as well. </p>
  
  <p>This seems like it should be a fairly common task, but I have not been able to come up with a solution yet. Any suggestions would be appreciated. My Frankenstein's Monster of a first Django site is almost complete, and this is one of last pieces I am missing. </p>