possibly it may be on YOUR pythonpath but it won't be on apache's
pythonpath.

here is my /etc/apache2/extra/httpd-vhosts.conf

# SUSTAIN
BETA

<Location "/sustain">
    PythonPath
"['/home/crucial/gitpo/djapps','/home/crucial/gitpo/pluggables','/home/crucial/gitpo','/home/crucial/gitpo/sustain']
+ sys.path"

    Order allow,deny
    Allow from all
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE sustain.settings

    PythonOption django.root /sustain
    PythonDebug Off

    PythonAutoReload Off

</Location>

same gear as you, slicehost

I hope that helps somehow

-f;lix



On Thu, Oct 16, 2008 at 2:57 PM, delfick755 <[EMAIL PROTECTED]> wrote:

>
> hello.
>
> I'm trying out django atm, and I've got it working using the manage.py
> runserver, but I'm having difficulty making my apache server use it
> properly, getting the ImportError: Could not import settings problem
>
> I have it so that the django app is in my home directory, and I've
> added an appropiate .pth to my /usr/lib/python2.5/site-packages
> directory pointing to /home/iambob/web (the django app is inside /home/
> iambob/web/testSite)
>
> in the normal python console (and python manage.py shell) "import
> testSite.settings" works
>
> but when I run it on the apache server, it tells me
> ImportError: Could not import settings 'testSite.settings' (Is it on
> sys.path? Does it have syntax errors?): No module named
> testSite.settings
>
> I've also made a test.py script residing in /var/www that I've got
> mod_python to successfully execute.
> the test.py then prints out sys.path which the same as sys.path from
> the python console except that it doesn't have ['/home/iambob/web', '/
> home/iambob/web/testSite'] (or /home/iambob/svn/pyamf as well)
>
> so in the test.py I added the appropiate sys.path.append() to add
> those two, so that the sys.path outputted from the test.py and the
> python console are the same and yet it still has problems importing
> testSite.settings (even in the test.py)
>
> if anyone could help me make my server see the django app, that'd be
> great :)
>
> thankyou
>
> btw, I'm running the following :
> Ubuntu 8.04
> Python 2.5
> Django svn
> Apache 2.2.8
>
> >
>

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

Reply via email to