Skip to content

Instantly share code, notes, and snippets.

@martincr
Last active January 19, 2016 01:58
Show Gist options
  • Save martincr/415ccd8d4756fe893550 to your computer and use it in GitHub Desktop.
Save martincr/415ccd8d4756fe893550 to your computer and use it in GitHub Desktop.

Database setup ##############

Using PostgreSQL, you need the psycopg2 package pip install psycopg2

psql
CREATE DATABASE mydjangosite;
\l

Change

'ENGINE': 'django.db.backends.sqlite3',

to

django.db.backends.postgresql
CREATE USER django WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE mydjangosite TO django;

Set up

python manage.py makemigrations
python manage.py migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment