How to run python code using an html button (flask)
Hello, I have been working on a project recently, and I have ran into a problem.
None of the things I google give me clear answers to what I am asking for, so I just had to come to replit to see who could help me.
Just a heads up, I am kind of a noob at flask, so if im not getting something that is the reason.
Some code samples
The main question is, why doesn't onclick work, or am I just using it wrongly?
<button onclick("server.py")> Click me </button>
Its supposed to print "Hello" everytime I click the button, to see if its working (ah yes, test runs). But all it does when I run it, is Hello! then all the flask stuff. Why is this? And is there a solution?
Also, you do not have to use onclick for the answer, I just use that for tests a lot.