git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to POST html data to be handled by a route endpoint


First i must say i use Bottle, but the same may also be the case in Flask too. I ask here and not in sub Bottle because there are only a few people there and i receive no responses.

Actualy since i started here let me say what i have found.

Iam just trying to post html form data to the following endpoint.

@app.route( '/mailform', method=['POST'] )
IF i try to post the html form data using the the endpoint url way, i get "Method NOT Allowed" error:

<form method="POST" action="/mailform">


WHILE if i try the following way, i receive no error.

<form method="POST" action="%s"> ...html...  </form>''' % app.get_url(
'/mailform )

Can someone explain why?!