Categories
Python Answers

How to fix Python Flask Value error view function did not return a response?

Spread the love

Sometimes, we want to fix Python Flask Value error view function did not return a response.

In this article, we’ll look at how to fix Python Flask Value error view function did not return a response.

How to fix Python Flask Value error view function did not return a response?

To fix Python Flask Value error view function did not return a response, we should return a response in our view.

For instance, we write

@app.route('/')
def my_form():
    return render_template("my-form.html")

to call render_template with the template file name to return the template with the given file name as the response.

Conclusion

To fix Python Flask Value error view function did not return a response, we should return a response in our view.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *