#30941: hasattr(request, '_cached_user') check no longer works
---------------------------------+--------------------------------------
     Reporter:  Collin Anderson  |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  contrib.auth     |                  Version:  master
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Collin Anderson):

 I have some urls (like checkout pages) that access the user and some urls
 that don't (like product pages). I might want to use middleware to log
 what the user is doing, but I don't want to cause a user+session lookup on
 product pages where user wasn't accessed.

 Similarly, there's a `request.session.accessed`, but I'm seeing now that
 even that is undocumented. But I'm realizing I could probably get away
 with just checking `request.session.accessed` because most pages that look
 at the session are also going to pull up the user.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30941#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.aa9717f220ca4ac144676b0cf420d54e%40djangoproject.com.

Reply via email to