I am trying to store an instance of something like MyClass below in
the session.  When I go to retrieve the instance of MyClass from
session, and I try to access myClass.instanceOfAnotherClass it says
the variable's not found.

class MyClass:
    def __init__(self, instanceOfAnotherClass):
        self.instanceOfAnotherClass = instanceOfAnotherClass

class MyOtherClass:
    ...

After reading the django session documentation I saw the technical
note that a class must be pickleable.  I tried to make my classes
pickleable by implementing __getstate__ and __setstate__, but I got
the same results.

Does anyone know what I'm doing wrong?  Is what I'm trying to do a bad
practice... should one not store nested (complex) classes in session?
Am I not making the pickleable correctly?

Thanks for your help!
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to