import os
import sys

BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, BASE_DIR)

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')

try:
    from config.wsgi import application
except Exception as e:
    def application(environ, start_response):
        start_response('200 OK', [('Content-Type', 'text/plain')])
        return [str(e).encode()]