POST/GET not working in Flask

Hello,
I’m using this code as a guide:
https://www.askpython.com/python-modules/flask/flask-forms

It all seems to be working except when I click submit, the method is recognized as GET instead of POST, and the wrong message is displayed.

Any ideas?

Thank you,
Mike

We don’t do any method-mangling on our end. Without seeing your actual code it’s hard to say what the issue could be, but it’s unlikely to be anything Platform.sh-related.

Sorry, here is the code:
image

The form.html and data.html template pages are missing.

I have them in a folder named ‘templates’ in the same folder as server.py. The form page loads and I’m presented with the text box input and a submit button. But when I submit text, I’m shown the return for the GET method, not the POST method.

image

… I mean you didn’t share them. Those are where the forms are defined, so an issue with how the form is getting sent to the server would be in those files. As I said, I’m fairly certain there’s nowhere that Platform.sh will convert a POST into a GET, so the issue is likely in your code somewhere.

Thanks. I have no idea what I’m doing. I’ll try to figure it out.