title: (Python) Flask - request.args.get returning NoneType
body: <p>All I need to complete this website is for it to grab the <code>n</code> and <code>s</code> values from the input.
  But when executing <code>request.get.args</code> is returning None everytime
  Here's the code:</p>
  
  <p><code>my_website.py</code>:</p>
  
  <pre><code>import sqlite3
  from flask import Flask,render_template, url_for, redirect, request
  
  
  app = Flask(__name__)
  conn = sqlite3.connect('shoes.db', check_same_thread=False)
  c = conn.cursor()
  
  @app.route("/", methods=["GET", "POST"])
  def main():
  
      if request.method == 'GET':
          return render_template('main.html')
  
      elif request.method == 'POST':
          return redirect(url_for('search'))
  
  
  @app.route("/search/", methods=["GET", "POST"])
  def search():
  
      if not request.args.get("n"):           
          raise RuntimeError("missing n")
  
      if not request.args.get("s"):
          raise RuntimeError("missing s")
  
      name = request.args.get('n')
      size = request.args.get('s')
      c.execute("SELECT * FROM shoes WHERE name LIKE ? AND sizes LIKE ? ORDER BY price",
                      ('%'+name+'%','%'+size+'%'))
  
      p = c.fetchall()
  
      url = [p[i][0] for i in range(len(p))]
      names = [p[i][1] for i in range(len(p))]
      prices = [p[i][2] for i in range(len(p))]
      sizes = [p[i][3] for i in range(len(p))]
      shoe_type = [p[i][4] for i in range(len(p))]
  
      return render_template('search.html' , url=url, names=names, prices=prices,
                             sizes=sizes, shoe_type=shoe_type)
  
  
  if __name__ == '__main__':
      app.run(debug=True)
  </code></pre>
  
  <p><code>main.html</code>:</p>
  
  <pre><code>{% extends "layout.html" %}
  {% block content %}
  
  &lt;form action = "{{ url_for('main') }}" class="form" method = "POST" &gt;
      &lt;div&gt;
          &lt;h1&gt;Soccer Shoes Finder&lt;/h1&gt;
          &lt;div class="line-separator"&gt;&lt;/div&gt;
          &lt;div&gt;
              &lt;div class="container-fluid"&gt;
                  &lt;input name = "n" type="text" placeholder="Name"/&gt;
                  &lt;input name = "s" type="text" placeholder="Size"/&gt;
                  &lt;button class="glyphicon glyphicon-search" aria-hidden="true"&gt;&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  &lt;/form&gt;
  
  {% endblock %}
  </code></pre>
  
  <p>This is the error that I'm getting:</p>
  
  <pre><code>RuntimeError: missing n
  </code></pre>
  
  <p>Any advice would be appreciated.
  Thanks.</p>