Changes between Version 3 and Version 8 of Ticket #30941
- Timestamp:
- Nov 4, 2019, 3:04:34 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30941
- Property Cc added
-
Ticket #30941 – Description
v3 v8 1 1 Before https://github.com/django/django/commit/2f01079, it was possible to check to see whether the lazy user has been evaluated or not using `hasattr(request, '_cached_user')`. 2 2 3 This was undocumented, but I think we should try to maintain backwards compatibility for that thatcheck, and document and test it for the future. (Or if nothing else, document and test how to do this the new way and add a release note about the change.)3 This was undocumented, but I think we should try to maintain backwards compatibility for that check, and document and test it for the future. (Or if nothing else, document and test how to do this the new way and add a release note about the change.) 4 4 5 5 This is really helpful in middleware to be able to check whether the user has been evaluated, so you can access the user if it has already been accessed, but can avoid fetching user if it hasn't already been fetched.