Filtering flashes

Report a typo

Complete the program so that it displays the corresponding messages only when accessing the corresponding URL.
So, if the category is /info show messages in the info, /warning for warning, and so on.

Sample Input 1:

GET

Sample Output 1:

correct
Write a program in Python 3
from flask import Flask, flash, get_flashed_messages

app = Flask('main')

@app.route('/info')
def info_view():
flash('There are some info', 'info')
flash('And some alert!', 'warning')

pass #your code here

@app.route('/warning')
def warn_view():
flash("Greatest hits of 50's!", 'info')
flash('O-oh, here is an alarm!', 'warning')

pass #your code here

@app.route('/error')
def error_view():
flash("We are the best company of the world!", 'about')
flash('We accidentally broke the authorization system...', 'error')

pass #your code here
___

Create a free account to access the full topic