diff --git a/django/utils/functional.py b/django/utils/functional.py
index e52ab76..05d5cb6 100644
a
|
b
|
def lazy(func, *resultclasses):
|
234 | 234 | memo[id(self)] = self |
235 | 235 | return self |
236 | 236 | |
| 237 | def __getstate__(self): |
| 238 | import pickle, sys |
| 239 | thismodule = sys.modules[__name__] |
| 240 | setattr(thismodule, '__proxy__', self.__class__) |
| 241 | return {'func': pickle.dumps(self.__func), |
| 242 | 'args': pickle.dumps(self.__args), |
| 243 | 'kw': pickle.dumps(self.__kw),} |
| 244 | |
| 245 | def __setstate__(self, state): |
| 246 | import pickle, sys |
| 247 | thismodule = sys.modules[__name__] |
| 248 | setattr(thismodule, '__proxy__', self.__class__) |
| 249 | self.__func = pickle.loads(state['func']) |
| 250 | self.__args = pickle.loads(state['args']) |
| 251 | self.__kw = pickle.loads(state['kw']) |
| 252 | |
237 | 253 | def __wrapper__(*args, **kw): |
238 | 254 | # Creates the proxy object, instead of the actual value. |
239 | 255 | return __proxy__(args, kw) |