1
0
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:
Asif Saifuddin Auvi
2017-02-25 12:48:20 +06:00
committed by Tim Graham
parent 6b00af5014
commit 5f3a689f71
13 changed files with 69 additions and 58 deletions

View File

@@ -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