python创建flask项目

default_blueprint.py

from flask import Blueprint

dft_blueprint = Blueprint("default", __name__)


@dft_blueprint.route("/")
def index():
    return "Success"

app.py

from flask import Flask

from default_blueprint import dft_blueprint

app = Flask(__name__)

app.register_blueprint(dft_blueprint)

app.run()

你可能感兴趣的:(#,django,flask,python)