Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tcostam/00733c03be510a4fc45a49f8f0b2c701 to your computer and use it in GitHub Desktop.
Save tcostam/00733c03be510a4fc45a49f8f0b2c701 to your computer and use it in GitHub Desktop.
  1. Add postgres config to your local.py
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'USER': 'username',
        'NAME': 'dbname',
        'PASSWORD': 'pass',
        'HOST': '127.0.0.1',
        'ATOMIC_REQUESTS': True,
    }
}
  1. Install posgtgres locally

  2. Then, create the postgres user:

createuser username
  1. And, create the database
createdb -O username dbname
  1. finally, run you migrations
python manage.py migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment