Skip to content

contributing to django project

portsucker edited this page Apr 17, 2015 · 5 revisions

Contributing to a Django Project

Please configure all the prerequisites as listed on: https://github.com/mattharley/matt/wiki/Django-Python-Heroku-Platform-Requirements

Assumptions

${PROJECT} is the name of your project for all of the steps below

Joining an existing project

  • New Virtual Environment:
mkvirtualenv ${PROJECT}
cdvirtualenv
git clone [email protected]:mattharley/acs.git  //SSH
cd ${PROJECT}

Warning: If you clone with https it is very difficult to then switch over to an SSH connection!! If you intend to use SSH then clone with SSH...

Install the project dependancies pip install -r requirements.txt

Add a remote for your local repository git remote add heroku-test https://git.heroku.com/{PROJECT}-test.git

#Setting up the .env file

  1. cdvirtualenv
  2. Make a new file named '.env'
  3. Add the following lines to it (local development environment setup):
export DEBUG=True
export PROJECT=${PROJECT}
  1. Activate the environment variables
cd .. && cd ${PROJECT}
  1. Setup the secret key as an environment variable by adding the following line to the .env file
export SECRET_KEY='${YOUR_SECRET_KEY}'

To generate a secret key use this tool. Please select a sensible prefix to differentiate between local and hosted keys i.e. "local-temp-key"