import os
import sys

# 1. Add the current directory to Python's path so it finds your project
sys.path.insert(0, os.path.dirname(__file__))

# 2. Set the default settings module (just to be safe)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "imagesearch.settings")

# 3. Import the 'application' object from your project's wsgi.py
# Your project name inside the code is 'imagesearch', regardless of the domain name.
from imagesearch.wsgi import application