Create important files

・runtime.txt

This is the file that tells the Python version to Heroku. Let's check the version of python by typing python --version at the command prompt.

runtime.txt

python-3.6.6

・Procfile

Procfile is the file in which contains the command to start the heroku process. Let's create the following file.

Procfile

web: gunicorn procjectName.wsgi --log-file -

※ Since the projectName of the django application under development is included in the place called projectName, please change each of them.

※ Example: Project name is my_project

web: gunicorm my_project.wsgi --log-file -

gunicorn is a python library that simply connects web servers and web applications. If you have not installed it, install it with the pip command (or conda command for anaconda). You can check with pip list to make sure if it is installed or not.

pip listpip install gunicorn

・requirements.txt

requirements.txt is a file that tells heroku, "I will use this module and libraries!"

You can create it with the following command. Let's type in the hierarchy of the project folder.

Command Prompt

pip freeze > requirements.txt

pip freeze is a command to output with the specific version of the library that you are using.

>requirements.txt is a command to create by inputting the output on the left side of the inequality into the file on the right side. So it's all good with the above command.

・.gitignore

Please use .gitignore (with the dot) in git described later.Simple explanation is that I want to push my files to the service called git, but files that i don't want to that be declare in .gitignore. (For example, the setting file for the development environment described later)