title: Creating forms with method="get" in django
body: <p>I have a form containing two text input types. The value from both the forms are passed onto the view <code>myfunc</code> which then passes it on to another template.the url of the form results should be </p>
  
  <p><code>/app/1/new_page/?key=key&amp;value=value</code></p>
  
  <p>But on submitting the form, it goes to the following url -</p>
  
  <pre><code>/app/1/new_page/?csrfmiddlewaretoken=CpYebRXTmLkHfo6hRQSrfZPdMFjWW9Ri&amp;key=a1&amp;value=41325
  </code></pre>
  
  <p>and gives the error - </p>
  
  <pre><code>Exception Type:     TemplateDoesNotExist
  Exception Value:    &lt;WSGIRequest: GET '/app/1/new_page/?csrfmiddlewaretoken=CpYebRXTmLkHfo6hRQSrfZPdMFjWW9Rikey=a1&amp;value=41325'&gt;
  </code></pre>
  
  <p>Even manually entering the correct url gives the same <code>Exception Type and Value</code></p>
  
  <p>But I have declared the template in the view. What could be the problem here? </p>
  
  <p><code>template containing form</code></p>
  
  <pre><code>&lt;form action="{% url 'my_func' id %}" method="GET"&gt;
      {% csrf_token %}
      &lt;input id="key" type="text" name="key" value=""&gt;
      &lt;input id="value" type="text" name="value" value=""&gt;
      &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><code>views.py</code></p>
  
  <pre><code>def myfunc(request, id):
      key = request.GET.get('key')
      value = request.GET.get('value')
      context = {'key': key}
      return render_to_response(request,'template.html', context)
  </code></pre>
  
  <p><code>urls.py</code></p>
  
  <pre><code>url(r'^app/(?P&lt;id&gt;\d+)/new-page/$', views.myfunc, name="my_func"),
  </code></pre>