magic-removal: changed explicit settings import to qualified settings import in django.core.xheaders
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
02ea6a4074
commit
ba787be1af
|
@ -15,7 +15,7 @@ def populate_xheaders(request, response, model, object_id):
|
|||
HttpResponse according to the given model and object_id -- but only if the
|
||||
given HttpRequest object has an IP address within the INTERNAL_IPS setting.
|
||||
"""
|
||||
from django.conf.settings import INTERNAL_IPS
|
||||
if request.META.get('REMOTE_ADDR') in INTERNAL_IPS:
|
||||
from django.conf import settings
|
||||
if request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS:
|
||||
response['X-Object-Type'] = "%s.%s" % (model._meta.app_label, model._meta.object_name.lower())
|
||||
response['X-Object-Id'] = str(object_id)
|
||||
|
|
Loading…
Reference in New Issue