- Clone the repo:
> git clone https://github.com/NA5G/coco-server-was.git
> cd coco-server-was
- Make sure you have
pip
andvirtualenv
installed:
> brew install pip
> pip install virtualenv
- Create a virtual environment for the project and install the necessary packages:
> virtualenv --no-site-packages --distribute env
> source env/bin/activate
(env)> pip install -r requirements/dev.txt
- If
pg_config
error was raised, add the following line to~/.bash_profile
:
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/[Your Postgres App Version]/bin
- If you want deactivate the virtualenv, use:
(env)> deactivate
- Move to the coco project directory:
(env)> cd coco
- Copy coco/local_settings.py.default to coco/local_settings.py and edit to match your current environment.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '[YOUR_DATABASE_NAME]',
'USER': '',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
}
}
- Run the server:
(env)> python ./manage.py runserver
- If you install/uninstall python packages, you have to update the requirements file
(env)> pip freeze > requirements/dev.txt
- For selenium:
> virtualenv --no-site-packages --distribute tenv
> source tenv/bin/activate
(tenv)> pip freeze > requirements/test.txt
Code and documentation copyright 2015 Team NA5G. Code released under the MIT license.