Use RAILWAY_ENVIRONMENT to detect production

Switch database config to use RAILWAY_ENVIRONMENT instead of DATABASE_URL
for better local development with SQLite

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude 2025-07-12 04:32:01 +05:30
parent 338de02bbb
commit e03a30a735

View File

@ -87,7 +87,7 @@ WSGI_APPLICATION = 'netcop_hub.wsgi.application'
# Database
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
if config('DATABASE_URL', default=''):
if config('RAILWAY_ENVIRONMENT', default=''):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',