Changes between Version 3 and Version 8 of Ticket #30941


Ignore:
Timestamp:
Nov 4, 2019, 3:04:34 PM (5 years ago)
Author:
Carlos_Mir_de_Souza
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30941

    • Property Cc Sergey Fedoseev Simon Charette added
  • Ticket #30941 – Description

    v3 v8  
    11Before 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')`.
    22
    3 This was undocumented, but I think we should try to maintain backwards compatibility for that 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.)
     3This 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.)
    44
    55This 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.
Back to Top