Monday, February 28, 2011

Re: django and mod_wsgi

Try adding,
 

import os

import sys

 

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

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


if path not in sys.path:

    sys.path.append(path)

    sys.path.append(path1)

 

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()


atm
___
Life is short, Live it hard.




On 28 February 2011 17:49, Szabo, Patrick (LNG-VIE) <patrick.szabo@lexisnexis.at> wrote:

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



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment