Re: mod_python apache problems...

2006-08-29 Thread mediumgrade

Thanks, Ricardo. That was it :-)


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: mod_python apache problems...

2006-08-27 Thread Ricardo Kirkner

On Sun, Aug 27, 2006 at 06:07:08PM -, mediumgrade wrote:
> 
> I am trying to setup my django site using mod_python and apache.
> 
> My Django project is called "autosales" and it works just fine when
> accessing it from the development web server. However, when I try to
> access it from apache, I get the following error
> 
> EnvironmentError: Could not import settings 'autosales.settings' (Is it
> on sys.path? Does it have syntax errors?): No module named
> autosales.settings
> 
> Here is my apache virtual host entry:
> 
> 
> ServerAdmin [EMAIL PROTECTED]
> ServerName autoapp.somedomain.com
> SetHandler python-program
> PythonHandler django.core.handlers.modpython
> SetEnv DJANGO_SETTINGS_MODULE autosales.settings
> PythonDebug On
> 
> 

I have something like this running, and the equivalent configuration would be


ServerNameautoapp.somedomain.com
SetHandlerpython-program
PythonPath"['/path/to/project/parent'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnvDJANGO_SETTINGS_MODULE autosales.settings
PythonDebug On


So, if you have your project located at /var/www/django/autosales, then the
PythonPath should be "['/var/www/django'] + sys.path"

HTH
Ricardo

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: mod_python apache problems...

2006-08-27 Thread Michael
    PythonPath "['/path/to/project'] + sys.path"
Try removing "project from path:PythonPath "['/path/to/'] + sys.path"and add path to dkango src:PythonPath "['/path/to/django'] + ['/path/to/topdirectoryofproject'] + sys.path"
-- --Michael

--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---


mod_python apache problems...

2006-08-27 Thread mediumgrade

I am trying to setup my django site using mod_python and apache.

My Django project is called "autosales" and it works just fine when
accessing it from the development web server. However, when I try to
access it from apache, I get the following error

EnvironmentError: Could not import settings 'autosales.settings' (Is it
on sys.path? Does it have syntax errors?): No module named
autosales.settings

Here is my apache virtual host entry:


ServerAdmin [EMAIL PROTECTED]
ServerName autoapp.somedomain.com
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE autosales.settings
PythonDebug On



I am not sure what to do. I also tried adding PythonPath
"['/path/to/project'] + sys.path" in my virtual host entry like so:


ServerAdmin [EMAIL PROTECTED]
ServerName autoapp.somedomain.com
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonPath "['/path/to/project'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE autosales.settings
PythonDebug On


But I still get the same message. Keep in mind that I am restarting
apache every time I make a change.

Any ideas?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---