Skip to content

Instantly share code, notes, and snippets.

@acdha
Created December 17, 2009 19:00
Show Gist options
  • Save acdha/258940 to your computer and use it in GitHub Desktop.
Save acdha/258940 to your computer and use it in GitHub Desktop.

Prerequisites

Project Specific Setup

Setting up a new virtualenv

  • pip install psycopg2

Setting up a new database

This process recently:

sudo -H -u postgres createuser -E --pwprompt <DB_USER>
sudo -H -u postgres createdb -O <DB_USER> <DB_NAME>
sudo -H -u postgres -- /usr/local/pgsql/bin/createlang plpgsql <DB_NAME>
sudo -H -u postgres -- psql -d <DB_USER> -f /usr/local/pgsql/share/contrib/postgis.sql
sudo -H -u postgres -- psql -d <DB_USER> -f /usr/local/pgsql/share/contrib/spatial_ref_sys.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment