4 | | 1. lazy object is pickled without DJANGO_VERSION_PICKLE_KEY in wrapping user object. |
5 | | 2. related object "profile" is pickled. It also has a reference to the user object. ( profile.user, due to one-to-one relationship) |
6 | | 3. the user object(profile.user) is pickled again with same dict used at step 1. DJANGO_VERSION_PICKLE_KEY is set. |
| 4 | 1. wrapped user object is pickled without DJANGO_VERSION_PICKLE_KEY in its dict. ({{{SimpleLazyObject.__reduce_ex__ #instancemethod}}}) |
| 5 | 2. related object "profile" is pickled. It also has a reference to the user object. ( profile.user, due to one-to-one relationship ({{{Model.__reduce__ #instancemethod}}}) |
| 6 | 3. the user object(profile.user) is pickled again with same dict used at step 1. DJANGO_VERSION_PICKLE_KEY is set.({{{Model.__reduce__ #instancemethod}}}) |