Monday, February 28, 2011

django and mod_wsgi

I’m trying to get my django-app running on apache 2.2  on windows XP.

I’ve installed everything and the Hello Worlf wsgi ran fine.

 

Now i wanted to run my django ap and did the following in a django.wsgi :

 

import os

import sys

 

path = 'C:\\Programme\\Apache Software Foundation\\Time2\\Time2\\'

if path not in sys.path:

    sys.path.append(path)

 

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' (I’ve tried to replace mysite with the name of my app but that doesn’t work either)

 

import django.core.handlers.wsgi

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

 

I get the following error:

 

[Mon Feb 28 13:11:06 2011] [error] [client 10.122.64.212] ImportError: Could not import settings 'mysite.settings' (Is it on sys.path? Does it have syntax errors?): No module named mysite.settings

 

My project is called Time2.

 

Like i said a test file from the wsig tutorial runs fine so wsgi should be installed correctly.

 

Can anyone help me ?!

 

Kind regards

 

 

. . . . . . . . . . . . . . . . . . . . . . . . . .

Patrick Szabo
XSLT-Entwickler

LexisNexis
Marxergasse 25, 1030 Wien

patrick.szabo@lexisnexis.at

Tel.: +43 (1) 534 52 - 1573

Fax: +43 (1) 534 52 - 146



No comments:

Post a Comment