I have a view that calls a function to get the response. However, it gives the error View function did not return a response. How do I fix this?
View function did not return a response
The following does not return a response:
@app.route('/hello', methods=['GET', 'POST']) def hello(): hello_world()
You mean to say...
@app.route('/hello', methods=['GET', 'POST']) def hello(): return hello_world()
Note the addition of return in this fixed function.
return