title: django - input value in paginator - set and read user entered input
body: <p>I am working on widget for paginator in django framework.</p>
  
  <p>I have the following in the template: When navigating by default the value should be shown as page number, but if a user enters a specific page number it has to navigate to that page number.
  I am setting value for input box using <code>paginator.number</code> from django <code>Paginator</code>.</p>
  
  <p>If user enters a number, then how can I read that value? Since it was already set value as <code>paginator.number</code> which shows up page number, but how to read a user entered value?</p>
  
  <pre><code>&lt;input type="text" OnChange="location.ref='?page{{ paginator.user_entered }}'" value="{{paginator.number}}"&gt;
  
  First &lt;&lt; [input-textbof&lt;Page#&gt;] &gt;&gt; Last
  </code></pre>
  
  <p>More Detailed Code</p>
  
  <pre><code>    &lt;div class="col-md-6 text-left"&gt;
          {% if items.has_other_pages %}
                  &lt;div class="btn-group" &gt;
                  {% if items.has_previous %}
                    &lt;button type="button" class="btn btn-default btn-md page-first" onclick="location.href='?pagenumber=1&amp;limit={{rows}}';"&gt;First&lt;/button&gt;
                    &lt;button type="button" class="btn btn-default btn-md page-arrows" onclick="location.href='?pagenumber={{ items.previous_page_number }}&amp;limit={{rows}}';"&gt;&amp;laquo;&lt;/button&gt;
                  {% else %}
                    &lt;button type="button" class="btn disabled" &gt;First&lt;/button&gt;
                    &lt;button type="button"  class="btn disabled"&gt;&amp;laquo;&lt;/button&gt;
  
                  {% endif %}
                      &lt;/div&gt;
          &lt;span&gt;&lt;b&gt;Page &lt;/b&gt;&lt;/span&gt;
                  &lt;input type="text" style="width:50px" onchange="location.href='?pagenumber={{items.number}}&amp;limit={{rows}}';" onkeyup="this.onchange()" oninput="this.onchange()" value="{{items.number}}" &gt;
                      &lt;span&gt; of {{items.paginator.num_pages}}&lt;/span&gt;
  
  
                   &lt;div class="btn-group" &gt;
                  {% if items.has_next %}
  
                    &lt;button type="button"  class="btn btn-default btn-md page-arrows"  onclick="location.href='?pagenumber={{ items.next_page_number }}&amp;limit={{rows}}';"&gt;&amp;raquo;&lt;/button&gt;
                    &lt;button type="button"  class="btn btn-default btn-md page-last" onclick="location.href='?pagenumber={{ items.paginator.num_pages }}&amp;limit={{rows}}';"&gt;Last&lt;/button&gt;
                  {% else %}
  
                    &lt;button type="button"  class="btn btn disabled"&gt;&amp;laquo;&lt;/button&gt;
                      &lt;button type="button" class="btn disabled" &gt;Last&lt;/button&gt;
  
                  {% endif %}
                   &lt;/div&gt;
  
          {% endif %}
  
  
      &lt;/div&gt;
  </code></pre>