postgres added

This commit is contained in:
Egor Matveev
2021-07-11 11:56:36 +03:00
parent 30bf2ba87b
commit d32578a3fb
4 changed files with 78 additions and 3 deletions

View File

@@ -87,8 +87,12 @@ WSGI_APPLICATION = 'Sprint.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.getenv('POSTGRES_DB'),
'USER': os.getenv('POSTGRES_USER'),
'PASSWORD': os.getenv('POSTGRES_PASSWORD'),
'HOST': '0.0.0.0',
'PORT': '5432',
}
}
@@ -138,7 +142,7 @@ USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static_root")
STATIC_ROOT = os.path.join(BASE_DIR, "static")
MEDIA_ROOT = os.path.join(BASE_DIR, 'data')