LoginSignup
1
2

More than 3 years have passed since last update.

【Python】Flaskで静的ディレクトリを追加したい【static以外も使いたい】

Posted at

結論

# coding: utf-8
from flask import Flask, Blueprint

app = Flask(__name__)

#静的ディレクトリの追加
add_app = Blueprint("images", __name__, static_url_path="/images", static_folder="./images")
app.register_blueprint(add_app)

if __name__ == '__main__':
    app.run()
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2