- 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,
}
}
-
Install posgtgres locally
-
Then, create the postgres user:
createuser username
- And, create the database
createdb -O username dbname
- finally, run you migrations
python manage.py migrate