2 Days ago, I ran into a very unusual error regarding Python Flask. I was simply coding along when I ran into an error which confused me. I was doing a Python Course which showed that we can make our code easier to read if we add some decorators to the code. When I added the same decorator as the one shown in the video, I ran into an error which said
Name error: Name @make_bold is not defined
Here's the code
app = Flask(__name__)
@app.route('/')
def func():
return 'Hey'
@app.route("/bye")
@make_bold
@make_emphasis
@make_underlined
def func1():
return 'Bye'
if __name__ == "__main__":
app.run(debug=True)