-1

Is it possible within the html template to call a python function? for example:

Call a function to check for a word within an input on the keypress event?

Thanks

Steve
  • 11
  • 1

1 Answers1

0

You are able to call function in Flask, yes

for example:

def say_smt():
  print("hey")

@app.route('/')
def site():
  say_smt()

however using an input() would initiate a break in the whole script, so it would crash the whole Flask Server so that's not possible. Please be more specific about what your goal is

Asdat 3
  • 19
  • 5