"""
Phusion Passenger WSGI entry point for cPanel shared hosting.

Truehost's cPanel "Setup Python App" runs this file from the application
root. It exposes the Django WSGI callable as ``application``.

Shared cPanel hosting normally serves HTTP through WSGI. REST endpoints,
admin, static files, and database access work through this path. Django
Channels WebSockets require ASGI support, so keep REDIS_URL empty on the
Starter package unless Truehost confirms ASGI/WebSocket support for the
account.
"""

import os
import sys


APP_ROOT = os.path.dirname(os.path.abspath(__file__))
os.chdir(APP_ROOT)

if APP_ROOT not in sys.path:
    sys.path.insert(0, APP_ROOT)

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base.settings')

from django.core.wsgi import get_wsgi_application  # noqa: E402


application = get_wsgi_application()
