0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[memo] Flask Configuration

Posted at

Flaskは自由度が高い分、もっとも良い設定が施されてなくても動かす分には問題がないです。
しかし、環境が変わったり新規作開発がにスムージに行うためにはきちんとプロセスを決めたほうが得策です。

気になるところ

  • PythonのPath
  • development/production
  • debug mode
  • logの出力先

configuration

  • export FLASK_ENV=development
  • config.py
class Development(object):
    DEBUG = True
    DB_URI = "開発環境の設定"

class Testing(object):
    TESTING = True
    DB_URI = "テスト環境の設定"

class Production(object):
    DB_URI = "本番環境の設定"

##参考

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?