Forums

Getting Welcome To Django Instead of Site

I have a site that I can run successfully with honcho, but whenever I try to run it on pythonanywhere, I just get the generic "Welcome To Django" page. I have deleted everything in the wsgi.py file except for the following. Why isn't it picking up my django formatting?

import os
import sys

path = '/home/user/app/project'
if path not in sys.path:
    sys.path.append(path)

#os.chdir(path)

import django.core.handlers.wsgi

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "appNAME.settings")

application = django.core.handlers.wsgi.WSGIHandler()

hi bae- also replied to you over email.

If you are running django with version > 1.7, note that the correct call is

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

instead of application = django.core.handlers.wsgi.WSGIHandler()