Something that\'s puzzling me a bit...
>>> from django.core.cache import get_cache
>>>
>>> cache = get_cache(\'django.core.cache.backe
import pickle # or from django.utils.six.moves import cPickle as pickle
lass TestObj(object):
pass
testobj = TestObj()
pickled = pickle.dumps(testobj, pickle.HIGHEST_PROTOCOL)
pickled
'\x80\x02c__main__\nTestObj\nq\x00)\x81q\x01}q\x02b.'
i can't understand a behavior, when i open a console session with "python manage.py shell" and execute: _pickle.PicklingError: Can't pickle : attribute lookup builtins.TestObj failed
but when open a single python console and execute the same code, works fine! Is there a reason?
I observed too, if i open a single console, and import from django.utils.six.moves import cPickle as pickle works fine too. The problem just occours when the code is executed in django context. :(