diff -r cf2ca8865912 django/middleware/doc.py
|
a
|
b
|
|
| 12 | 12 | indicating the view function. This is used by the documentation module |
| 13 | 13 | to lookup the view function for an arbitrary page. |
| 14 | 14 | """ |
| | 15 | assert hasattr(request, 'user'), "The XView middleware requires authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.auth.middleware.AuthenticationMiddleware'." |
| 15 | 16 | if request.method == 'HEAD' and (request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS or |
| 16 | 17 | (request.user.is_active and request.user.is_staff)): |
| 17 | 18 | response = http.HttpResponse() |