On Thu, 2007-10-04 at 09:34 -0700, juampa wrote:
> Hello all:
> 
> I am deploying a Django project with Apache 2.0.55 and mod_python
> 3.3.1 on Mac OS X Panther 10.3.9 server.
> The problem is that when I try to load the page on my browser, I get a
> mod_python debug error indicating that my project's settings cannot be
> imported by django/conf/__init__.py (Line 85, Environment Error). But
> I know the path is correct. I even added an assert line to
> django.conf.__init__.py to dump the sys.path and it has indeed the
> proper path to my project, as loaded in httpd.conf with:
> 
> PythonPath "['/path/to/project'] + sys.path"
> setEnv DJANGO_SETTINGS_MODULE project.settings

This is going to be a little hard to debug because I presume your *real*
path isn't /path/to/project. So I'll just point out the problem in your
example here: You need to be able execute "import project.settings" once
your Python path is set up. So the *parent directory* of 'project' needs
to be in your Python path. If settings.py is inside project/ and your
Python path is /path/to/project, then the settings module setting would
be just 'settings' (not 'projects.settings').

At all times, the *parent* of any directories you are importing from
need to be in the Python path.

Regards,
Malcolm


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