title: How to print the value from the drop down box in flask?
body: <p>This my base HTML file:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;names&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div&gt;PS: &lt;a href="/ps"&gt;Home&lt;/a&gt;&lt;/div&gt;
      &lt;hr&gt;
      {% block content %}{% endblock %}
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This my tasks.html file</p>
  
  <pre><code>{% extends "base.html" %}
  {% block content %}
    &lt;div class="page"&gt;
    &lt;table&gt;
    &lt;tr&gt;
    &lt;form action="{{ url_for('new_task') }}" method="POST" class=new-task&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;
    &lt;label&gt;name :&lt;/label&gt;
    &lt;select name="name" width="100px"&gt;
    &lt;option value="1"&gt;name1&lt;/option&gt;
    &lt;option value="2"&gt;name2&lt;/option&gt;
    &lt;option value="3"&gt;name3&lt;/option&gt;
    &lt;option value="4"&gt;name4&lt;/option&gt;
    &lt;option value="5"&gt;name5&lt;/option&gt;
    &lt;/select&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &amp;nbsp;
    &amp;nbsp;
    &lt;input class="button1" type="submit" value="Press"&gt;
    &lt;/td&gt;
    &lt;/form&gt;
     &lt;/tr&gt;
     &lt;/table&gt;
     &lt;/div&gt;
     &lt;/table&gt;
  {% endblock %}
  </code></pre>
  
  <p>This my python file views.py</p>
  
  <pre><code>from flask import render_template
  from app import app
  @app.route('/tasks', methods=['POST'])
  def new_task():
      tts = request.form['name']
      flash(str(tts)+'is being selected')
      render_template("tasks.html")
  @app.route('/ps')
  def ps():
      render_template("ps.html")
  </code></pre>
  
  <p>I want to just print the value whatever is being selected from the drop down menu.
  But i am getting this error
   "Method Not Allowed
  The method is not allowed for the requested URL."
  Actually i am new to flask programming
  Please tell me where i am doing wrong . Help will be highly appreciated :)</p>