diff --git a/eventyog/settings.py b/eventyog/settings.py index 4f08eda..cd8dbd6 100644 --- a/eventyog/settings.py +++ b/eventyog/settings.py @@ -85,17 +85,24 @@ load_dotenv() # Load environment variables from a .env file -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql', - 'NAME': os.getenv('DB_NAME', 'eventyog'), - 'USER': os.getenv('DB_USER', 'pemilos24_owner'), - 'PASSWORD': os.getenv('DB_PASSWORD', 'DRzSsw7Pc2HE'), - 'HOST': os.getenv('DB_HOST', 'ep-late-cloud-a1j1feg2-pooler.ap-southeast-1.aws.neon.tech'), - 'PORT': os.getenv('DB_PORT', 5432), +if (os.getenv('PROD') != 'True'): + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } } -} - +else: + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': os.getenv('DB_NAME', 'eventyog'), + 'USER': os.getenv('DB_USER', 'pemilos24_owner'), + 'PASSWORD': os.getenv('DB_PASSWORD', 'DRzSsw7Pc2HE'), + 'HOST': os.getenv('DB_HOST', 'ep-late-cloud-a1j1feg2-pooler.ap-southeast-1.aws.neon.tech'), + 'PORT': os.getenv('DB_PORT', 5432), + } + } # Password validation # https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators