First, create a clean base environment using virtualenv:
virtualenv --no-site-packages --distribute {{ project_name }}
cd {{ project_name }}
source bin/activate
Install the requirements and the project source:
cd path/to/your/{{ project_name }}/repository
pip install -r requirements.pip
pip install -e .
You can learn more about which requirements are used and why in the requirements section.
If you’re just checking the project out locally, you can copy some example configuration files to get started quickly:
cp {{ project_name }}/settings/local.py.example {{ project_name }}/settings/local.py
You’ll need to configure the DATABASES setting in {{ project_name }}/settings/local.py. Change db_user and db_password as needed.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '{{ project_name }}',
'USER': 'db_user',
'PASSWORD': 'db_password',
'HOST': '',
'PORT': '',
}
}
Note
HOST defaults to localhost and PORT defaults to 5432. You can leave those options blank to just use the defaults.
Lastly, sync the database and run all the database migrations:
manage.py syncdb --migrate