我创建了一个具有以下结构的 Flask 应用程序:
/nhs-listpull
/listpull
/static
/templates
__init__.py
models.py
views.py
app.db
config.py
run.py
运行.py
from listpull import app
app.run(debug=True)
/listpull/__init__.py
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from mom.client import SQLClient
from smartfocus.restclient import RESTClient
app = Flask(__name__)
app.config.from_object('config')
db = SQLAlchemy(app)
...
/listpull/views.py
import logging
import time
from flask import request, render_template, flash, redirect, send_file
from zlib import compress, decompress
from StringIO import StringIO
@app.route('/')
def index():
... do stuff ...
return render_template('jobs.html', jobs=jobs)
当我运行./run.py
web 服务器启动时,但浏览返回 404。
知道为什么吗?