Auth Context Processor returns user as a Lazy Object, which breaks things
|Reported by:||ericholscher||Owned by:||lukeplant|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
With the addition in r11621, when a template checks the type or equality of request.user given from the auth context processor, you used to get:
ipdb> type(response.context['user']) Out: <class 'django.utils.functional.SimpleLazyObject'>
Previously, this returned an auth.User object.
Attached is a test that fails with the current trunk. It passes with the current test structure and pre-r11621 auth context_processor.
Change History (6)
Changed 5 years ago by ericholscher
comment:1 Changed 5 years ago by ericholscher
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset