Deploy Django web + Postgres to Heroku
Step 0: create 项目存放的目录

Step 1: Set up the virtual machine



Step 2: Install some packages for the virtual machine such as: django, gunicorn, django-heroku

Step 3: Set up a new Django application

使用编辑器打开项目


Step 4: Run the Django application on localhost


Step 5: Set up new and add some configuration information for files such as: runtime.txt, Procfile, requirements.txt



Step 6: Add some information to the settings.py file of the Django project.




Step 7: Log in to heroku through the CMD window

Step 8: Set up a new app on heroku through CMD window


Step 9: Git remote, add, commit, push Django to heroku via CMD window


Step 10: Migrate Postgres data through CMD window









Step 11: Set up superuser for Django app through CMD window






- 点赞
- 收藏
- 关注作者
评论(0)