自定义URL


使用装饰器@app.route自定义URL

@app.route('/news/')
def news():
    return 'news'


@app.route('/news/detail/')
def detail():
    return 'detail'


@app.route('/news.html')
def news_html():
    return 'news html'

results matching ""

    No results matching ""