In case the problem lies in manipulating the python path inside a
<Location> section, perhaps you could play another trick to load the
different versions of django. I am doing as follows, though, not with
Location tags but in VirtualHost sections, and it works for me:

Somewhere on the python path, there is a subdirectory,
django_versions. In there, several django trees exist. On the same
level as django_versions subdirectory i have wrapper modules, one for
each django version i need, named django_trunk.py, django_096.py, and
so on. The wrapper code reads:

##
import imp, os
django = imp.load_module(
        "django",
        *imp.find_module("django", [os.path.join(
                os.path.dirname(__file__), "django_versions", "django-
trunk"
        )] )
)
del imp, os

all together, the layout is:
/python-path/django_trunk.py
/python-path/django_someversion.py
/python-path/django_vresions/
/python-path/django_versions/django-trunk/django
/python-path/django_vresions/django-someversion/django

Note, there is no need to have an __init__.py inside django_versions,
since the path munging is done in the wrapper module, where the
required django module is loaded from a temporary fixed path set up
dynamically.

To use this, a second wrapper file is needed for the mod_python
handler. This one is named django_trunk_handler.py and should be put
somewhere on your python path as well:

import django_trunk as django
from django.core.handlers.modpython import handler

And analogous to that, you can have django_someversion_handler.py:

import django_someversion as django
from django.core.handlers.modpython import handler

Now, in httpd.conf, this comes together:
<Location /version1>
  ...
  PythonHandler django_trunk_handler
  PythonInterpreter version1
</Location>
<Location /version2>
  ...
  PythonHandler django_someversion_handler
  PythonInterpreter version2
</Location>

Finally, you might want to have different manage.py stubs with an
extra first line importing the right django module as django into the
namespace to get going.

Best regards...

Niels

On Jul 19, 12:46 pm, oggie rob <[EMAIL PROTECTED]> wrote:
> Thanks for your help, Russ. I updated mod_python (which was probably
> overdue anyway), but that didn't fix the problem. I've been looking
> for other signs but nothing has surfaced yet.
> If anybody else can recall a similar experience, please let me know!
>
>  -rob
>
> On Jul 18, 9:07 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > On 7/19/07, oggie rob <[EMAIL PROTECTED]> wrote:
>
> > > Please, if you've seen the same issue or have any helpful ideas to try
> > > to stop the error, let me know.
>
> > I think I've seen the same problem (or, at least, an analogous one).
> > Unfortunately, I can't provide much by way of helpful debug or
> > solution - the sysadmin that identified the problem for us isn't
> > around for me to ask him for more details.
>
> > As I recall, the problem was mod_python. Older versions of mod_python
> > had some sort of issue with caching python instances. As a result, if
> > you deployed two different versions of Django, the version of Django
> > that was provided to a given request was determined by the thread that
> > served the request. If the first request served by a thread used the
> > old version of Django, that was the version that was used for all
> > subsequent requests on that thread, regardless of the version that was
> > required to satisfy the request.
>
> > I believe we fixed the problem by updating mod_python, but I'm not
> > completely certain on that.
>
> > I know that this is all vague and ambiguous help - sorry I can't be
> > more specific.
>
> > Yours,
> > Russ Magee %-)- Hide quoted text -
>
> - Show quoted text -


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