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

DL Neil PythonList at DancesWithMice.info
Fri Mar 6 17:33:48 EST 2020


On 7/03/20 2:33 AM, Νίκος Βέργος wrote:
> 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?!


Please post the full error message and traceback.

To clarify: is the error coming from Python or from the web server?

-- 
Regards =dn


More information about the Python-list mailing list