2042Labs / electiongauge

0 stars 0 forks source link

########################################

Setting up the system dependencies

########################################

Install pip, virtualenv, virtualenv wrapper

easy_install pip pip install virtualenv pip install virtualenvwrapper

Then follow setup instructions located here: http://www.doughellmann.com/docs/virtualenvwrapper/

Install postgres

brew install postgres

Previous command requires homebrew instead of macports or fink.

More info: http://mxcl.github.com/homebrew/

#############################

Setting up the database

#############################

Create db called 'eguage'

Note it is for development only. Feel free to adjust as necessary

Create user called 'eguage' w/ pass 'eguage'.

Setting up Geo Django

brew install postgis

Follow these instructions: https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/

TODO ADD MORE NOTES

Install GDAL (Python) * Note, you might have to compile from source

workon electionegauge

Note, numpy must come first

pip install numpy pip install GDAL

Test by running the following:

from osgeo import gdal from osgeo import ogr from osgeo import osr from osgeo import gdal_array from osgeo import gdalconst

If you have problems: http://www.gdal.org

Run the following after your spatial database is set up

This will create the egauge database based off of the template.

More into on creating the template: https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#spatialdb-template

createdb -T template_postgis egauge

#################################

Getting started with Django

#################################

########################################

Setting up the project environment

########################################

Setup a clean new virtualenv called electiongauge

mkvirtualenv electiongauge --no-site-packages

Active virtualenv (This requires virtualenv wrapper to be set up)

workon electiongague

For development install requirements_dev.pip

pip install -r requirements_dev.pip

This will install requirements.pip also

###########################

Helpful project links

###########################

https://convore.com/electiongauge