Skip to content

Commit

Permalink
Use get
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelafox committed Sep 27, 2023
1 parent cee189d commit 4144249
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
static_folder='static'
)

@app.route('/')
@app.get('/')
def index():
return render_template('index.html')

@app.route('/hello')
@app.get('/hello')
def hello():
return render_template('hello.html', name=request.args.get('name'))

@app.errorhandler(404)
def handle_404(e):
return '<h1>404</h1><p>File not found!</p><img src="https://httpcats.com/404.jpg" alt="cat in box">', 404
return '<h1>404</h1><p>File not found!</p><img src="https://httpcats.com/404.jpg" alt="cat in box" width=400>', 404


if __name__ == '__main__':
Expand Down

0 comments on commit 4144249

Please sign in to comment.