Interactive Somerville is a tool for visualizing issues, asking questions, learning facts, and contributing ideas related to the Greenline Extension Project in Somerville, MA.
This is a fresh start, intentended to migrate the existing code base for Pinax 0.7 in the legacy branch to Pinax 0.9 fresh-start.
A Pinax basic project served as starting point.
Follow the documentation at virtualenv or virtualenvwrapper. If you're using virtualenvwrapper, then create a new virtual environment with
$ mkvirtualenv interactivesomerville --no-site-packages
$ git clone git://github.com/SomervilleCC/interactivesomerville.git
$ cd interactivesomerville
$ pip install -r requirements/project.txt
$ sudo apt-get install binutils python-setuptools postgresql-8.4-postgis postgresql-server-dev-8.4 python-psycopg2 gdal-bin python-gdal libproj-dev
...on Ubuntu 10.10 with PostGIS 1.5 for instance:
$ sudo su postgres
$ POSTGIS_SQL_PATH=/usr/share/postgresql/8.4/contrib/postgis-1.5
$ createdb -E UTF8 template_postgis
$ createlang -d template_postgis plpgsql
$ psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';"
$ psql -d postgres -c "update pg_database set datistemplate = false where datname = 'template_postgis';"
$ psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
$ psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql
$ psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;"
$ psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
$ psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"
Please see GeoDjango installation docs for more detailed information and troubleshooting.
$ createuser interactivesomerville
$ #Shall the new role be a superuser? (y/n) n
$ #Shall the new role be allowed to create databases? (y/n) y
$ #Shall the new role be allowed to create more new roles? (y/n) n
$ psql
$ ALTER ROLE interactivesomerville WITH password 'password';
$ \q
$ exit
$ sudo adduser interactivesomerville
$ sudo su - interactivesomerville
$ createdb interactivesomerville -T template_postgis
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "interactivesomerville",
"USER": "interactivesomerville",
"PASSWORD": "password",
"HOST": "",
"PORT": "",
}
}
.. to settings.py
or create a local_settings.py
(recommended)
$ python manage.py syncdb
$ python manage.py runserver
...in your localhost at http://127.0.0.1:8000