Method is not allowed for the requested URL
<pre><code>from flask import *
from flask_restful import *
import sqlite3
import database


@app.route('/admin')
def admin():
    """ hanldes the admin page for user entry """

    db = database.database()
    db.create()
    db.table('admin')
    #data = db.print_database('admin')
    #return render_template ("mylogin.html", input = 'admin', dbs = data.fetchall())
    return render_template ("mylogin.html", input = 'admin')

@app.route('/admin', methods = ["POST"])
def admin_post():
    """ hanldes the admin page for user entry """
    print "handling post"
    return request.form['text']

if __name__ == "__main__":
    app.run(debug=True)
</code></pre>

<p>HTML CODE : I have not posted the entire code here as not deviate from the issue I am facing. I am able to open the /admin page and when I give an input , getting an error "Method is not allowed for the requested URL"</p>

<pre><code>&lt;h2&gt;welcome admin&lt;/h2&gt;
&lt;form action="." method ="POST"&gt;
    hello admin
    &lt;input type = "text" name = "text"&gt;
    &lt;input type = "submit" name ="my-form" value = "Send"&gt;
&lt;/form&gt;
</code></pre>