Python Flask Basics Welcome to Flask View Args Through URL

John Davis
John Davis
14,423 Points

Not sure what is wrong with my code here. It seems to be fine. But I don't know what is not passing.

I have followed the tutorial - and it is still not passing.

flask_app.py
from flask import Flask

app = Flask(__name__)


@app.route('/<name>')
def hello(name="Treehouse"):
     return 'Hello {}'.format(name)
John Davis
John Davis
14,423 Points

I get it now. I should have ADDED the route in the first question - instead of edited the above route:

Like so:

@app.route('/')
@app.route('/<name>')

I should have read the directions more closely.