Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #4933 -- Fixed a typo and reformatted a fairly long line in pas…

…sing. Thanks, Ludvig Ericson.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 534671a46fd0b2c0340e592f254b8772993fff19 1 parent a564adb
Malcolm Tredinnick authored August 12, 2007

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  django/core/xheaders.py
6  django/core/xheaders.py
@@ -4,7 +4,7 @@
4 4
 
5 5
 This module contains utility functions for retrieving and doing interesting
6 6
 things with these special "X-Headers" (so called because the HTTP spec demands
7  
-that custom headers are prefxed with "X-").
  7
+that custom headers are prefixed with "X-").
8 8
 
9 9
 Next time you're at slashdot.org, watch out for X-Fry and X-Bender. :)
10 10
 """
@@ -17,6 +17,8 @@ def populate_xheaders(request, response, model, object_id):
17 17
     or if the request is from a logged in staff member.
18 18
     """
19 19
     from django.conf import settings
20  
-    if request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS or (hasattr(request, 'user') and request.user.is_authenticated() and request.user.is_staff):
  20
+    if (request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS
  21
+            or (hasattr(request, 'user') and request.user.is_authenticated()
  22
+                and request.user.is_staff)):
21 23
         response['X-Object-Type'] = "%s.%s" % (model._meta.app_label, model._meta.object_name.lower())
22 24
         response['X-Object-Id'] = str(object_id)

0 notes on commit 534671a

Please sign in to comment.
Something went wrong with that request. Please try again.