Hi John!

I also started my Django-work on WinXP, but I used the built-in Django
webbserver and I never had any "no module"-errors. I'm now using
Ubuntu-Apache-modpython-PostgreSQL and when I started in Ubuntu, I had
some of those errors.

My solution was (except for recreating a corrupt database) putting the
right stuff in the Location-directive in Apache-config and making sure
the right user was running the Apache-server and owned the Django-
files.

I'm not sure if this helps you, but you can add this in Apache conf to
set which user owns the Apache server thread:

<IfModule !mpm_netware_module>
.....

User postgres
Group postgres
</IfModule>

So, in my case, the user is called 'postgres'. On the django project
directory, to make sure the apache thread could read the django files,
I did this, being root:

chown -R postgres .

Explanation:
-R = recursive
. = files in current folder
postgres = new owner to the files


My biggest problem was to get the Location directive right in the
httpd.conf. It now looks like this:

<Location "/">
  SetHandler mod_python
  PythonHandler django.core.handlers.modpython
  PythonPath "sys.path + ['/usr/local/apache2/django']"
  SetEnv DJANGO_SETTINGS_MODULE myproject.settings
  PythonDebug On
  PythonAutoReload On
</Location>

OK, maybe that path isn't the smartest, but I'm a Linux noob and I'm
learning. The "PythonAutoReload On" means that mod_python reloads all
python modules automatically whenever they change. This is on by
default, I read somewhere, but I figured it wouldn't hurt.

To make apache update better, you could set this somewhere in
httpd.conf:
MaxRequestPerChild 1

I hope this helps.

/Henrik


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