diff --git a/civicfix/settings.py b/civicfix/settings.py index 0dc6e1b..9a0fd3e 100644 --- a/civicfix/settings.py +++ b/civicfix/settings.py @@ -1,10 +1,6 @@ import os from pathlib import Path -import dj_database_url from dotenv import load_dotenv -import cloudinary -import cloudinary.uploader -import cloudinary.api # Load .env file (for local dev only, Render will use Environment tab) load_dotenv() @@ -31,12 +27,6 @@ INSTALLED_APPS = [ 'core.apps.CoreConfig', ] -CLOUDINARY_STORAGE = { - 'CLOUD_NAME': os.getenv('CLOUD_NAME'), - 'API_KEY': os.getenv('API_KEY'), - 'API_SECRET': os.getenv('API_SECRET'), -} - AUTH_USER_MODEL = 'core.User' MIDDLEWARE = [ @@ -71,11 +61,14 @@ WSGI_APPLICATION = 'civicfix.wsgi.application' # Database (Render Postgres, fallback to SQLite locally) DATABASES = { - "default": dj_database_url.config( - default=os.environ.get("DATABASE_URL"), - conn_max_age=600, - ssl_require=True, - ) + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'civicfix_db', + 'USER': 'civicfix_user', + 'PASSWORD': 'Devs@xw2G7vy&', + 'HOST': 'localhost', + 'PORT': '5432', + } } # Password validators @@ -97,18 +90,6 @@ STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" - -cloudinary.config( - cloud_name=os.getenv("CLOUD_NAME"), - api_key=os.getenv("API_KEY"), - api_secret=os.getenv("API_SECRET"), - secure=True -) - -# Default storage (Cloudinary) -DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage' - - # Auth redirects LOGIN_REDIRECT_URL = 'citizen_dashboard' LOGIN_URL = 'login'