Hey All,

Im getting the error "ImportError: Could not import settings
'setting'" when running my Django project on a SliceHost server using
Apache/mod_python.

Here is my vhost file (located in /etc/apache2/sites-available/
myproject):

<VirtualHost *:80>

    ServerName www.example.com
    ServerAlias nahnooh.com, *.example.com
    ErrorLog /home/user/logs/error.log
    CustomLog /home/user/logs/access.log combine

    <Location "/">
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        PythonPath "['/home/user/software/django', '/home/user/src'] +
sys.path"
        SetEnv DJANGO_SETTINGS_MODULE settings
        PythonDebug On
    </Location>

    <Location "/admin_media">
        SetHandler None
    </Location>

    <Location "/media">
        SetHandler None
    </Location>

    <Location "/uploads">
        SetHandler None
    </Location>

    <LocationMatch "\.(jpg|gif|png)$">
        SetHandler None
    </LocationMatch>

    Alias /admin_media /usr/lib/python2.5/site-packages/django/contrib/
admin/media
    Alias /media /home/user/media
    Alias /uploads /home/user/uploads

</VirtualHost>

The folder /home/user/src contains the settings.py file (as well as
urls.py, manage.py, and __init__.py). I have tried to tweak these
settings quite a bit, but with no luck.

I have gotten this message to disappear by typing this into a python
shell (to get the settings and url files to compile into .pyc files):

>>> import settings, urls

But it seems to me that I should not need to do this and that there is
some other problem. I am sure it is something simple, but I cant for
the life of me figure it out. Any help would be greatly appreciated!

Thank You!
Dana
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to