import sys
import os

# Add the project directory to the Python path
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, PROJECT_DIR)

# Set the Django settings module
os.environ['DJANGO_SETTINGS_MODULE'] = 'backend.settings'

# For Django 4.x+
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

print("✅ Passenger WSGI loaded successfully!")
print(f"📁 Project Directory: {PROJECT_DIR}")
