I'm using the same setup I have for another django site running on the
same server. I haven't had to use the python-path arg to WDP before so
I'm not sure how to do that. I'm still pretty new to this so any help
would be much appreciated. I'm using the same wsgi script that works
for the other site so I don't see any problem but here it is if you
want to have a look:

import os, sys

path = '/home/username/public_html/mysite.com/'
if path not in sys.path:
    sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi

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

def application(environ, start_response):
    environ['wsgi.url_scheme'] = environ.get('HTTP_X_URL_SCHEME',
'http')
    return _application(environ, start_response)

On Dec 1, 1:53 pm, Skylar Saveland <skylar.savel...@gmail.com> wrote:
> Are you using python-path arg to WDP?  Also, you might do some
> sys.path hacking in the .wsgi script.
>
> neridaj wrote:
> > Hello,
>
> > I'm trying to deploy my project to my server and I don't understand
> > why django isn't finding modules I've added to my pythonpath. When I
> > try to access my site I get 500 errors and after looking at the server
> > log I see a traceback with this:
>
> > [error] [client 174.xxx.xxx.xxx] ImportError: No module named blog
>
> > However, when I run python I am able to import the modules. I'm using
> > nginx as a proxy to apache2/mod_wsgi on Ubuntu 9.04.
>
> > Thanks,
>
> > J

--

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


Reply via email to