diff -r b758351d191f -r cc9b7e14412b web/lib/django/middleware/doc.py --- a/web/lib/django/middleware/doc.py Wed May 19 17:43:59 2010 +0200 +++ b/web/lib/django/middleware/doc.py Tue May 25 02:43:45 2010 +0200 @@ -12,7 +12,8 @@ indicating the view function. This is used by the documentation module to lookup the view function for an arbitrary page. """ - if request.method == 'HEAD' and (request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS or (request.user.is_authenticated() and request.user.is_staff)): + if request.method == 'HEAD' and (request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS or + (request.user.is_active and request.user.is_staff)): response = http.HttpResponse() response['X-View'] = "%s.%s" % (view_func.__module__, view_func.__name__) return response