project-connect-api
- Install pre-requisites =========================
Virtualenv
Standard installation with virtualevnwrapper.
PostgreSQL
Standard installation.
Standard project initialization
1. Create virtual environment
-
Clone repository:
git clone https://github.com/razortheory/project-connect-api.git
-
Create virtual environment:
mkvirtualenv proco -p python3
-
Install requirements
pip install -r requirements/dev.txt
-
Edit
$VIRTUAL_ENV/bin/postactivate
to contain the following lines:export DATABASE_URL=postgres://username:password@localhost/dbname export DEV_ADMIN_EMAIL=your@email.com
-
Deactivate and re-activate virtualenv:
deactivate workon proco
2. Database
-
Create database table:
psql -U your_psql_user CREATE DATABASE proco;
-
Migrations:
./manage.py migrate
-
Create admin:
./manage.py createsuperuser
-
Run the server
./manage.py runserver
Alternative project initialization
-
Clone repository:
git clone https://github.com/razortheory/project-connect-api.git
-
Create project database
-
Execute the following command to setup database credentials:
echo DATABASE_URL=postgres://username:password@localhost/dbname >> env.config
-
Make sure that you are not in any of existing virtual envs
-
run
./initproject.bash
- will run all commands listed in standard initialization, including edition of postactivate -
activate virtualenv
workon proco
-
run
./manage.py runserver