未验证 提交 4cbf1b65 编写于 作者: J Jacob Schmitt 提交者: GitHub

Merge branch 'master' into jima/csv-interview

venv
__pycache__
\ No newline at end of file
web: gunicorn app:app
\ No newline at end of file
Source files supporting the [Deploying a Python Flask Example Application Using Heroku](https://realpython.com/python-flask-example-heroku/) article on [Real Python](https://realpython.com/).
import os
from flask import Flask
app = Flask(__name__)
env_config = os.getenv("APP_SETTINGS", "config.DevelopmentConfig")
app.config.from_object(env_config)
@app.route("/")
def index():
secret_key = app.config.get("SECRET_KEY")
return f"The configured secret key is {secret_key}."
import os
class Config:
DEBUG = False
DEVELOPMENT = False
SECRET_KEY = os.getenv("SECRET_KEY", "this-is-the-default-key")
class ProductionConfig(Config):
pass
class StagingConfig(Config):
DEBUG = True
class DevelopmentConfig(Config):
DEBUG = True
DEVELOPMENT = True
click==7.1.2
Flask==1.1.2
gunicorn==20.0.4
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
Werkzeug==1.0.1
# Python Web Applications: Deploy Your Script as a Flask App
Code snippets supplementing the [Python Web Applications: Deploy Your Script as a Flask App](https://realpython.com/python-web-applications-update/) tutorial.
Code snippets supplementing the [Python Web Applications: Deploy Your Script as a Flask App](https://realpython.com/python-web-applications/) tutorial.
## Running Locally
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册