I can not go to about_me
page from the index
page.
Error :
The requested URL was not found on the server.
and got url like "http://127.0.0.1:5000/%7B%7B%20url_for('about')%20%7D%7D"
.
from flask import Flask, redirect, url_for
app = Flask(__name__)
@app.route('/')
def index():
return '''
<!DOCTYPE html>
<html lang="en">
<head>
<title>Title</title>
</head>
<body>
<p>welcome home</p>
<a href="{{ url_for('about_me') }}">about</a>
</body>
</html>
'''
@app.route('/about')
def about_me():
return 'about me'
if __name__ == '__main__':
app.run(debug=True)