diff --git a/backend/foodgram/settings.py b/backend/foodgram/settings.py index 246ebfe..2e16fa3 100644 --- a/backend/foodgram/settings.py +++ b/backend/foodgram/settings.py @@ -74,22 +74,22 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'media') -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } -} # DATABASES = { # 'default': { -# 'ENGINE': 'django.db.backends.postgresql', -# 'NAME': os.getenv('POSTGRES_DB', 'django'), -# 'USER': os.getenv('POSTGRES_USER', 'django'), -# 'PASSWORD': os.getenv('POSTGRES_PASSWORD', ''), -# 'HOST': os.getenv('DB_HOST', ''), -# 'PORT': os.getenv('DB_PORT', 5432) +# 'ENGINE': 'django.db.backends.sqlite3', +# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), # } # } +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': os.getenv('POSTGRES_DB', 'django'), + 'USER': os.getenv('POSTGRES_USER', 'django'), + 'PASSWORD': os.getenv('POSTGRES_PASSWORD', ''), + 'HOST': os.getenv('DB_HOST', ''), + 'PORT': os.getenv('DB_PORT', 5432) + } +} REST_FRAMEWORK = {