[Answer]-ImportError: Could not import settings. No module named oscar. inslalling django-oscar on djangohosting.ch


I’m not sure what djangohosting.ch looks like but if you have a wsgi setup it should look something like this:

This file has more but usually has most of it setup by your host, these areas you may have to adjust

WSGIDaemonProcess cpm processes=5 python-path=/home/myuser/myproject/:/home/myuser/myproject/myproject:/home/myuser/v/lib/python2.6/ threads=1

WSGIScriptAlias / /home/myuser/myproject/wsgi.py


import os
import sys
from django.core.handlers.wsgi import WSGIHandler

sys.stdout = sys.stderr

from site import addsitedir

from os.path import abspath, dirname, join
from django.conf import settings

os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
application = WSGIHandler()

If this isn’t your setup I would at least try changing your python path to what I have in the httpd.conf file

Leave a comment