0
今天我開始了一個新的cookiecutter-flask應用(v。0.10.1)。我有一個問題讓它認識到路線有一個定義的模板。這是模塊的views.py。新模塊的cookiecutter-flask路由404
# -*- coding: utf-8 -*-
"""Spreadsheet views."""
from flask import Blueprint, render_template
from flask_login import login_required
blueprint = Blueprint('spreadsheet', __name__, url_prefix='/spreadsheets', static_folder='../static')
@blueprint.route('/list') #/spreadsheets/list
@login_required
def list():
"""List spreadsheets of user logged in."""
files = {name: 'Test', uploaded_by: 1}
return render_template('users/spreadsheets.html', files=files)
試圖達到http://127.0.0.1:5000/spreadsheets/list時,沒有錯誤消息,除了"GET /spreadsheets/list HTTP/1.1" 404 -
。我認爲我已經按照users/views.py這個例子進行了檢查,並且我已經檢查過幾次並且沒有得到複數形式的東西。
有什麼想法?