On 7/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> This works fine in the development server. Under mod_python, though, it
> appears that these class variables don't work (getRequest doesn't
> return what I've previously put in via newRequest). Is there a
> difference wrt class variables between mod_python and the development
> server?
>
> I'd assume the problem was due to the fact that mod_python spawns new
> processes for each request, right?

Yeah, that's exactly it. You shouldn't really count on any sort of
global variables in mod_python, because there's no guarantee you'll
get the same Python interpreter for one request that you got for a
previous request.

> Is there a workable solution for using class variables with mod_python?
> I'd hate to store this temporary information (removed once the user
> successfully changed his password) in the DB.

You could use the cache framework to store stuff in there temporarily.
Alternatively, I don't think it's a huge problem to store that in the
database.

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

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

Reply via email to