title: Get the value of input text element after pressing submit button in django
body: <p>I'm a newbie to Django and started learning it last week. My question is I have a web page which has an input text box and a submit button. <strong>I want to capture the input string</strong> entered in the next web page (redirecting page) which has been entered in the text box after pressing the submit button in Django.</p>
  
  <p><img src="https://i.stack.imgur.com/tHU3m.png" alt="This is how the initial web page looks like"></p>
  
  <p>I have tried the following:</p>
  
  <blockquote>
    <p>views.py</p>
  </blockquote>
  
  <pre><code>#View for the initial page
  def index(request):
      return render( request, 'index.html')
  
  #View for the Redirecting page -- This is where I want to catch the text box input
  def results(request):
      inp_value = request.GET.get('text_search', 'This is a default value')
      context = {'inp_value': inp_value}
      return render( request, 'results.html', context)
  </code></pre>
  
  <blockquote>
    <p>forms.py</p>
  </blockquote>
  
  <pre><code>from django import forms
  
  class TextForm(forms.Form):
      text_search = forms.CharField(label='Text Search', max_length=100)
  </code></pre>
  
  <blockquote>
    <p>index.html</p>
  </blockquote>
  
  <pre><code>&lt;form action="/searcher/results/" method="get"&gt;
          &lt;label for="results"&gt;Enter a string: &lt;/label&gt;
          &lt;input id="results" type="text" name="results" value="{{ search_results }}"&gt;
          &lt;input type="submit" value="submit"&gt;
      &lt;/form&gt; 
  </code></pre>
  
  <p>Can anyone point out why I'm not able to get the value of the textbox? </p>
  
  <p>Thanks in Advance</p>