title: Issues with recieving user input with flask
body: <p>Here is a program I wrote when I was first learning python a few weeks ago that simply solves the quadratic formula, checks if the solutions are extraneous, and finds a few key features of the quadratic graph including vertex, Line of symmetry, and I even got it to factor the radicals. This is all fine and dandy but it only worked in the console.</p>
  
  <p>When I began bringing it to the flask application and modifying it to accept user input it would only work with numbers that worked out to be perfect and not decimals. Such as A=1 B=4 C=4. Whenever something like A=2 b=1 C=4 is entered, it gives me this: HTTP 405 Error. </p>
  
  <p>main.py:</p>
  
  <pre><code>from flask import Flask, render_template, request
  import math
  
  app = Flask(__name__)
  
  @app.route('/', methods=['GET', 'POST'])
  def quadratic():
      if request.method == 'POST':
          a = float(request.form['a'])
          b = float(request.form['b'])
          c = float(request.form['c'])
          outside = b * -1
          bsquared = b ** 2
          four_a_c = 4 * a * c
          discriminant = bsquared - four_a_c
          bottom = 2 * a
          discriminant_sqrt = math.sqrt(discriminant)
          top = outside + discriminant_sqrt
          top2 = outside - discriminant_sqrt
          root = top/bottom
          root2 = top2/bottom
          equation = a * root ** 2 + b * root + c
          equation2 = a * root2 ** 2 + b * root + c
          if equation &lt; 1 and equation &gt; -1:
              Ex = "Not Extraneous"
          else:
              Ex = "Extraneous"
          if equation2 &lt; 1 and equation2 &gt; -1:
              Ex2 = "Not Extraneous"
          else:
              Ex2 = "Extraneous"
  
          return render_template('form.html', discriminant=discriminant, a=a, b=b, c=c, outside=outside, bsquared=bsquared, bottom=bottom, root=root, root2=root2, ex=Ex, ex2=Ex2)
  
      if request.method == 'GET':
          return render_template('form.html')
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  
  <p>form.html:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;form method="POST" action="."&gt;
    A &lt;input id="post_form_id" name="a" value="" /&gt;
      B&lt;input id ="post_form_id" name="b" value="" /&gt;
      C &lt;input id ="post_form_id" name="c" value="" /&gt;
     &lt;input type="submit" /&gt;
  &lt;/form&gt;
      &lt;br /&gt;
      {% if a %}
      A: {{ a }} &lt;br /&gt;
      B: {{ b }} &lt;br /&gt;
      C: {{ c }} &lt;br /&gt;
      Roots: &lt;br /&gt;
  
      {{ outside }} + √{{ discriminant }} &lt;br/&gt;
      --------- &lt;br/&gt;
         {{ bottom }}&lt;br/&gt;
  
      {{ outside }} - √{{ discriminant }} &lt;br/&gt;
      --------- &lt;br/&gt;
         {{ bottom }}&lt;br/&gt;
  
      Approxomated Roots: &lt;br/&gt;
      {{ root }} &lt;br/&gt;
      {{ ex }}   &lt;br/&gt;
      {{ root2}} &lt;br/&gt;
      {{ ex2 }}  &lt;br/&gt;
  
      {% endif %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>