On Aug 4, 8:42 pm, Salvatore Leone <salvatore.le...@isti.cnr.it>
wrote:
> Hi,
>
> I'm trying to move my site from the developemente server to Apache but I
> always obtain this error:
>
> ImportError: Could not import settings 'pecwizard.settings' (Is it on 
> sys.path? Does it have syntax errors?): No module named pecwizard.settings
>
> and here is my apache configuration:
>
> <Location "/pecwizard/">
>
>     SetHandler python-program
>
>     PythonHandler django.core.handlers.modpython
>
>     SetEnv DJANGO_SETTINGS_MODULE pecwizard.settings
>
>     PythonPath "['/home/testpec/public_html/pecwizard/'] + sys.path"

PythonPath "[''/home/testpec/public_html', '/home/testpec/public_html/
pecwizard/'] + sys.path"

The documentation says you need the parent directory.

BTW, putting Django source code in public_html is really bad.
Depending on Apache configuration, people could download your source
code via '/~testpec/pecwizard/settings.py'.

So, don't put it in a directory exposed via Apache as a document
directory.

Graham

>     PythonOption django.root /pecwizard
>
>     PythonDebug On
>
> </Location>
>
> any idea of what could be wrong?
>
> I tryend to put:
>
> SetEnv DJANGO_SETTINGS_MODULE /home/testpec/public_html/pecwizard/settings.py
>
> but it says something about I can't set the variable with a full path to
> the settings.py file
>
> -Salvatore
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to