Hi,

I had the same problem and what helped me was:
Changing the permissions of my project directory to 777 (The directory
where settings.py located)
Try to run:
chmod -R 777 /home/testpec/public_html/pecwizard

Regards, Alex A.

On Aug 4, 3:28 pm, Salvatore Leone <salvatore.le...@isti.cnr.it>
wrote:
> Graham Dumpleton ha scritto:
>
>
>
>
>
> > 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"
>
> I've tried this and even what Spajderix says, but still having the problem.
>
> This is the errore page I obtain:
>
> MOD_PYTHON ERROR
>
> ProcessId:      25805
> Interpreter:    '127.0.0.1'
>
> ServerName:     '127.0.0.1'
> DocumentRoot:   '/var/www'
>
> URI:            '/pecwizard/'
> Location:       '/pecwizard/'
> Directory:      None
> Filename:       '/var/www/pecwizard'
> PathInfo:       '/'
>
> Phase:          'PythonHandler'
> Handler:        'django.core.handlers.modpython'
>
> Traceback (most recent call last):
>
>  [... cut... I'll post if needed ]
>
> ImportError: Could not import settings 'pecwizard.settings' (Is it on 
> sys.path? Does it have syntax errors?): No module named pecwizard.settings
>
> I think the issue is related to the following line:
>
> DocumentRoot:   '/var/www'
>
> this is the Apache's root. But not the django one... I can copy my
> project to /var/www but it's borious for editing files (must be root...)
>
> any idea?> 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'.
>
> Oh, I know, but it's just for training myself before doing the same on a
> rack server.
--~--~---------~--~----~------------~-------~--~----~
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