import os
import sys

# 1. Add your project directory to the sys.path
# This points to the folder containing manage.py
project_root = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(project_root, 'whatsapp_automation'))

# 2. Set the environment variable for Django settings
# Path: whatsapp_automation/whatsapp_automation/settings.py
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'whatsapp_automation.settings')

# 3. Import the Django WSGI application
from whatsapp_automation.wsgi import application
