2019/02/16

Notes of Creating Heroku Python App

Master Tutorial
---------------------------
https://devcenter.heroku.com/articles/getting-started-with-python



Install the pipenv
----------------------------
reference:
https://docs.python-guide.org/dev/virtualenvs/#virtualenvironments-ref
you only need to install the part with "Installing Pipenv"

pipenv install -r requirements.txt
pipenv shell  # use ctrl+d to exit
pipenv run python main.py



App Create and Deploy
----------------------------
heroku create
git push heroku master
heroku ps:scale web=1
heroku open

Run local
----------------------------
pipenv shell
python manage.py collectstatic
heroku local web
# then open the browser

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...