/waywayd

a mobile application built on the ODK using geodjango and fluidDB

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

Setting up a Development Environment

(Tested on OSX but should work elsewhere)

You need:

Python (http://python.org)
GIT (http://git-scm.org)
Django-1.1.1 (http://www.djangoproject.com/download/)
Pinax 0.7.1 (http://pinaxproject.com/)
PostgreSQL (http://www.postgresql.org/)
PostGIS (http://postgis.refractions.net/)
Django Command Extensions (http://code.google.com/p/django-command-extensions/)
Django Multilingual (http://code.google.com/p/django-multilingual/) - this is
actually found in the third-party/ directory as I've had to bug-fix it. 
GraphViz (http://www.graphviz.org/)
Rosetta

1) Install Python - http://python.org
2) Install Postgres - http://www.postgresql.org/download/
3) Install PostGIS - http://postgis.refractions.net/documentation
4) Install GIT - http://git-scm.com/download 
4) Install Pinax - follow the instructions here:
  http://pinaxproject.com/docs/dev/install.html
5) Grab the code from GitHub - https://github.com/markherringer/cittadelcapo
6) Set up the database. Instructions from GeoDjango are excellent:
    http://geodjango.org/docs/tutorial.html#setting-up
    http://geodjango.org/docs/install.html#spatialdb-template
   (something like this: createdb -O geo -T template_postgis geo)
7) Make sure you're using the Pinax virtual-env (see instructions in step 4)
8) Install django-command-extensions (used to create pretty graphs of the db
   schema). # should be in Pinax
    http://code.google.com/p/django-command-extensions/
9) Install django-multilingual, from the citidelcappo directory:
    cd third-party/django-multilingual
    python setup.py install
10) Install Rosetta: 
    sudo easy_install django_rosetta

Install django-cms
Install olwidget from my branch

Both with ``python setup.py install``

8, 9 and 10 should be able to be accomplished with ``pip install -r requirements.txt``
from the project directory.

11) ./manage.py syncdb
11.5) run ``python add_hotels.py`` and ``python add_regions.py``
12) ./manage.py runserver
13) http://localhost:8000

To generate the database diagrams run the following command:

./manage.py graph_models -a > my_project.dot

Then use graphviz to create a .png image file:

dot -Tpng -O my_project.dot