【发布时间】:2018-07-11 15:37:16
【问题描述】:
在服务器上找不到请求的 URL。如果您手动输入网址,请检查您的拼写并重试
from flask import Flask
app = Flask(__name__)
@app.route('/user/<username>')
def show_user_profile(username):
return 'User %s' % username
@app.route('/post/<int:post_id>')
def show_post(post_id):
return 'Post %d' % post_id
@app.route('/path/<path:subpath>')
def show_subpath(subpath):
return 'Subpath %s' % subpath
【问题讨论】:
-
那么,您请求的 什么 URL?
-
我不能给你答案,因为这是我在烧瓶文档中找到的,这是我在网络应用程序上的第一天,所以我没有任何线索。