django-admin startproject cat
cd cat
python manage.py startapp exposure
python manage.py startapp levee
createdb geo
createdb tmp
psql
CREATE ROLE geo WITH LOGIN PASSWORD 'geo';
GRANT ALL PRIVILEGES ON DATABASE tmp TO geo;
GRANT ALL PRIVILEGES ON DATABASE geo TO geo;
ALTER USER geo CREATEDB;
psql geo
ALTER USER geo WITH PASSWORD 'geo';
CREATE EXTENSION postgis;
Make Migrations python manage.py makemigrations
Set up the django admin shell python manage.py shell
you can read a zipped geodatabase like so: ogrinfo /vsizip/Trecks.gdb.zip/Trecks.gdb *
postgis connection string: PG:"dbname='databasename' host='addr' port='5432' user='x' password='y'"
Ogrinfo * ogrinfo -ro PG:dbname=warmerda -sql "SELECT pop_1994 from canada where province_name = 'Alberta'"
Really good foss4geo 2015 write up here