How to get textbox value in views.py django
<p>I am trying to get the value of a textbox from views.py but its not working for some reason.</p>

<p>Below is my code </p>

<p><strong>base.html</strong> </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form   method="POST" role="form" &gt;
   {% csrf_token %}
   &lt;div class="tab-content"&gt;
      &lt;div class="tab-pane active" role="tabpanel" id="step1"&gt;
         &lt;div class="mobile-grids"&gt;
            &lt;div class="mobile-left text-center"&gt;
               &lt;img src="{% static 'images/mobile.png' %}" alt="" /&gt;
            &lt;/div&gt;
            &lt;div class="mobile-right"&gt;
               &lt;h4&gt;Enter your mobile number&lt;/h4&gt;
               &lt;!-- &lt;label&gt;+91&lt;/label&gt;&lt;input type="text"  name="mobile_number" class="mobile-text" value="asdfasd" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '';}" required=""&gt; --&gt;
               &lt;label&gt;+91&lt;/label&gt;&lt;input type="text"  name="mobile_number" class="mobile-text" value="" &gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;ul class="list-inline pull-right"&gt;
            &lt;li&gt;&lt;button type="button" class="mob-btn btn btn-primary btn-info-full" data-dismiss="modal"&gt;Finish&lt;/button&gt;&lt;/li&gt;
         &lt;/ul&gt;
      &lt;/div&gt;
      &lt;div class="clearfix"&gt;&lt;/div&gt;
   &lt;/div&gt;
&lt;/form&gt;</code></pre>
</div>
</div>
</p>

<p><strong>views.py</strong></p>

<pre><code>def home(request):
    mobile_number = request.POST.get('mobile_number')
    print(mobile_number)
    return render(request,"home.html", {'mobile_number': mobile_number})
</code></pre>

<p>I am getting <code>None</code> when I try to get the value of textbox <code>mobile_number</code>. </p>

<p>How can I get the correct value?</p>