AttributeError 'WSGIRequest' object has no attribute 'user'

Raised by:

django/contrib/admin/sites.py (line 162)

Traceback (most recent call last):
  File "python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "python2.7/site-packages/django/contrib/admin/sites.py", line 254, in wrapper
    return self.admin_view(view, cacheable)(*args, **kwargs)
  File "python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "python2.7/site-packages/django/contrib/admin/sites.py", line 222, in inner
    if not self.has_permission(request):
  File "python2.7/site-packages/django/contrib/admin/sites.py", line 162, in has_permission
    return request.user.is_active and request.user.is_staff
AttributeError: 'WSGIRequest' object has no attribute 'user'