> pip install psycopg2-binary
settings.py를 들어가보자.
원래라면
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
이처럼 django default database인 sqlite3로 연결되어 있겠지만, 우리는 postgresql을 쓰려고 한다.
따라서
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'drawingreferwiki',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432'
}
}
로 변경한다.