Deprecating AuthenticationMiddleware

50 views
Skip to first unread message

Tim Graham

unread,
Jun 2, 2017, 11:11:01 AM6/2/17
to Django developers (Contributions to Django itself)
Curtis started a PR [0] that replaces the functionality of AuthenticationMiddleware.process_request():

request.user = SimpleLazyObject(lambda: get_user(request))

with this line in AuthConfig.ready():

HttpRequest.user = cached_property(get_user, 'user')

Before finishing the patch, I'd like to get a few more eyeballs on it to make sure there aren't any downsides to this approach. Thanks!

Reply all
Reply to author
Forward
0 new messages