mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Imported django.http classes instead of django.http.
This commit is contained in:
committed by
Tim Graham
parent
6b00af5014
commit
5f3a689f71
@@ -1,5 +1,5 @@
|
||||
from django import http
|
||||
from django.conf import settings
|
||||
from django.http import HttpResponse
|
||||
from django.utils.deprecation import MiddlewareMixin
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@ class XViewMiddleware(MiddlewareMixin):
|
||||
)
|
||||
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 = HttpResponse()
|
||||
response['X-View'] = "%s.%s" % (view_func.__module__, view_func.__name__)
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user