Forums

ImportError:Could not import settings

Please help being struggiing with this and I have triedsome suggestionsin previous answers to no avail, Please see my wsgi file below. Thanks in advance

activate_this = '/home/ocubed/.virtualenvs/olu/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))

import os
import sys

path = '/home/ocubed/funkeproj/'
if path not in sys.path:
    sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'schoolbooks.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

[edited by admin: code formatting]

Hmm, your web app looks like a Python 3.3 one, so the execfile won't work -- you'll need to do separate compile and exec steps. See this help page -- if you search for "python 3" you'll find the appropriate lines.