Skip to content

Instantly share code, notes, and snippets.

@jsleetw
Last active December 14, 2015 18:58
Show Gist options
  • Save jsleetw/5132828 to your computer and use it in GitHub Desktop.
Save jsleetw/5132828 to your computer and use it in GitHub Desktop.
setup postgresql with django on ubuntu
sudo apt-get install postgresql postgresql-clinet libpq-dev
pip install psycopg2
su postgres
createdb [db]
psql
CREATE USER "" WITH PASSWORD ''; ( user use " password use ')
on settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'name',
'USER': 'user',
'PASSWORD': 'password',
'HOST': 'hostname'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment