"""Passenger entry point for cPanel (Phusion Passenger).

cPanel's "Setup Python App" runs the app through Passenger, which imports an
``application`` callable from this file. We just re-export Django's WSGI app.
"""
import os
import sys

# Make the project importable (directory that contains this file).
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
if BASE_DIR not in sys.path:
    sys.path.insert(0, BASE_DIR)

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings')

from myproject.wsgi import application  # noqa: E402  (must follow sys.path setup)
