request.user returns a SimpleLazyObject, how do I “wake” it?
See my answer on a similar question. Django lazy loads request.user so that it can be either User or AnonymousUser depending on the authentication state. It only “wakes up” and returns the appropriate class when an attribute is accessed on it. Unfortunately, __class__ doesn’t count because that’s a primitive class attribute. There’s occasions where you … Read more