Flask - Middleware and Extensions
Which of the following is the correct way to define a
before_request handler in Flask?before_request handler in Flask?@app.before_request decorator is used without parentheses.@app.before_request() with parentheses above the function incorrectly adds parentheses, which is invalid. Call app.before_request(function_name) after defining the function is not how Flask registers before_request handlers. Define the function inside app.before_request() block is not valid syntax.@app.before_request without parentheses above the function -> Option B15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions