I keep forgetting how to do initial local setup of postgres for django projects, so here are the steps I generally follow:
- Install postgres locally (for mac I like postgres.app). If you get a return value from
which psql
, you should be good to go - Set up your local database:
$ psql
postgres=# CREATE USER myproject_user WITH PASSWORD 'myproject_user';
CREATE ROLE
postgres=# CREATE DATABASE myproject_main;