Hi.
I've built a password reset mechanism for my application using class
variables to store random passwords which are later used to authorize
password resets.
Here's what I'm using:
# Speichert Passwortanfragen und gibt sie bei Bedarf zurück
class PasswordRequest:
requests = {}
def newRequest(self, username, key):
self.requests[username] = key
def getRequest (self, username):
if self.requests.has_key(username):
return self.requests[username]
return None
def removeRequest(self, username):
if self.requests.has_key(username):
del self.requests[username]
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?
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.
Or is there something else scwewy awound here?
Daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---