title: Redirecting to a page from a form django
body: <p>I need to direct to a blank html page(test_page1.html) on submition of my html form..How can I do it in Django?</p>
  
  <p>I don't have any mapping for the new page in my urls.py file.</p>
  
  <pre><code>test_page.html
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Test Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  This is a test page
  {% if display_form %}
      &lt;form action="test_page1.html" method="post"&gt;{% csrf_token %}
          FIRST NAME : &lt;input type="text" name="fname"&gt;
          &lt;input type="submit" value="register"/&gt;
      &lt;/form&gt;
  {% else %}
      {% autoescape off %}
      {{ firstname }}
      {% endautoescape %}
  {% endif %}
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  views.py
  def test_page(request):
      if request.method == 'POST':
          print 'request.post = ', request.POST['fname']
          fname = cgi.escape(request.POST['fname'])
          print 'fname =', fname
          variables = RequestContext(request,{'display_form':False,'firstname':fname})
          return render_to_response('test_page.html',variables)
      else:
          variables = RequestContext(request,{'display_form':True})
          return render_to_response('test_page.html',variables)
  </code></pre>