Forums

Something when wrong, PythonAnywhere: Unhandled Exception

import os import sys

path = '/home/RyChan173/Django-Deployment-Example/a2'
if path not in sys.path:
    sys.path.append(path)

os.chdir(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'a2.settings'
django.setup()

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Look in your error and server logs for tracebacks and other messages that you can use to start debugging your web app.