To use this project, follow these steps:
- Create your working environment.
- Install Django (
$ pip install django
) - Create a new project using this template
Using this template to create a new Django app is easy::
$ django-admin.py startproject --template=https://github.com/heroku/heroku-django-template/archive/master.zip --name=Procfile helloworld
(If this doesn't work on windows, replace django-admin.py
with django-admin
)
You can replace helloworld
with your desired project name.
$ git init
$ git add -A
$ git commit -m "Initial commit"
$ heroku create
$ git push heroku master
$ heroku run python manage.py migrate
wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh //download and install heroku cli
heroku --version
heroku login
mkdir myapp
cd myapp
heroku create
django-admin startproject --template=https://github.com/heroku/heroku-django-template/archive/master.zip --name=Procfile myproject
source ../virenv/bin/activate
sudo apt-get install postgresql
sudo apt-get install python-psycopg2
sudo apt-get install libpq-dev
pip install -r requirements.txt
heroku local web //to run locallly
git add .
git commit -m "Added a Procfile."
heroku login
heroku create
git push heroku master