title: Django request.POST.get() returns None
body: <p>I face a problem and I can't find a solution. </p>
  
  <p>I'm trying to redirect to the previous page after login. Somehow the ?next=request.path returns none when trying to request.POST.get() after submission. </p>
  
  <p>This is my Html code that directs the user to the login page, taking the request.path as "next page after login" value.</p>
  
  <pre><code>{% if user.is_authenticated %}
      &lt;button class="btn" data-toggle="modal" data-target="#inquiryModal"&gt;
        &lt;a class="btn btn-primary border rounded-0" 
           role="button" href="#"&gt;Make an Inquiry&lt;/a&gt;
      &lt;/button&gt;
  {% else %}
       &lt;a class="btn btn-primary border rounded-0" role="button" 
          href="{% url 'login' %}?next={{ request.path|urlencode }}"
                          &gt;Make An Inquiry&lt;/a&gt;
  {% endif %}
  </code></pre>
  
  <p>This is the login page html code. </p>
  
  <pre><code>&lt;div class="login-clean" style="background-color: #fff;"&gt;
      &lt;form action="{% url 'login' %}" method="POST"&gt;
          {% csrf_token %}
  
          &lt;!--- ALERTS --&gt;
          {% include 'partials/_alerts.html' %}
  
          &lt;div class="form-group"&gt;
               &lt;input class="form-control" type="email" name="email" placeholder="Email"&gt;&lt;/div&gt;
          &lt;div class="form-group"&gt;
               &lt;input class="form-control" type="password" name="password" placeholder="Password"&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
               &lt;button class="btn btn-primary btn-block" type="submit"&gt;Log In&lt;/button&gt;
          &lt;/div&gt;
       &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Views.py file </p>
  
  <pre><code>def login(request):
      if request.method == 'POST':
          email = request.POST['email']
          password = request.POST['password']
          valuenext = request.POST.get('next')
  
  
          print(valuenext)
  
          user = auth.authenticate(username=email, password=password)
  
          # if user is found and not from listing page login and redirect to dashboard
          if user is not None and valuenext == "":
              auth.login(request, user)
              messages.success(request, 'You are now succesfully logged in')
              return redirect('dash_inquiries')
  
          # if user is found and from specific listing page login and redirect to the listing
          elif user is not None and valuenext != "":
              auth.login(request, user)
              print("success")
              messages.success(request, 'You are now logged in')
              return redirect(valuenext)
  
          else: 
              messages.error(request, 'Invalid credentials')
              return redirect('login')
  
      else:
          return render(request, 'accounts/login.html')
  </code></pre>
  
  <p>What am I doing wrong here? The next value is passed in the url when directing to the login page, but I don't seem to correctly get() the next value in my backend as it keeps returning None. </p>
  
  <p>Thanks in advance. </p>