Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

How to host Django application under Heroku platform:- 

Heroku is the best cloud platform, where you can host data freely for up to five applications and 512 MB webspace, it is the most secure and reliable platform.

What is Git?

It is a tool to provide integration for the version control systems, it can be GitHub or bitbucket.


 Create Project and app under localhost 

 Create requirements.txt file under a project directory



 create Procfile under a project directory web: gunicorn .wsgi 


 1) import os 
 2) append whitenoise library 

 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 

 write static directory under

 STATIC_URL = '/static/'
 STATIC_ROOT = os.path.join(BASE_DIR, 'static') 

 4) go into web application 

 5) create app

 6) go into setting and copy app link 
 again go into and change eg 

ALLOWED_HOSTS = ['', 'localhost', '']

 7) install gitbash if you are new to git

 8) Install it and write the following code cd project path eg cd d:/eroomrent 

 9) Implement the following git command (this command is also available in the deploy menu in heroku) 

 $ git init $ heroku git: remote -a remoteappname 

 $ git add. 

 $ git commit -am "make it better" 

 $ git push heroku master 

 10) go into setting menu and launch app url

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post