Data visualization app for the National Park Service Kelp Forest Monitoring program
Before embarking on installing marinemap and pyrifera you'll need the following installed on your system
- The GIT version control system (try Github.app for OS X or Git for Windows)
- Python 2.7+ (but not 3.0). Included in OS X, requires installation on Windows
- PIP
- PostGIS 2.0 (install Postgres.app on OS X or follow the GeoDjango Postgres and PostGIS installation instructions for Windows
git clone git@github.com:underbluewaters/pyrifera.git
cd pyrifera/pyrifera
pip install -r requirements.txt
Create the initial database
echo "DROP DATABASE pyrifera;" | psql -h localhost
echo "CREATE DATABASE pyrifera;" | psql -h localhost
echo "create extension postgis;" | psql -h localhost pyrifera
Tell pyrifera where to store media, and how to connnect to the db
head -n 3 settings_local.py.template > settings_local.py
mkdir ../deployed-media
python -c 'import os; print "MEDIA_ROOT=\"" + os.path.abspath("../deployed-media") + "\""' >> settings_local.py
echo 'MEDIA_URL = "http://localhost:8000/media/"\n' >> settings_local.py
echo 'DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "pyrifera",
"USER": "",
"PASSWORD": "",
"HOST": "localhost",
"PORT": "",
}
}' >> settings_local.py
Setup the applications database schema
python manage.py syncdb
python manage.py migrate
python manage.py site localhost:8000
python manage.py install_media
Feed data into the database following the steps in the data update guide.
python manage.py runserver