Django

Code

Changeset 5870

Show
Ignore:
Timestamp:
08/12/07 05:29:59 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4933 -- Fixed a typo and reformatted a fairly long line in passing. Thanks, Ludvig Ericson.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/xheaders.py

    r4090 r5870  
    55This module contains utility functions for retrieving and doing interesting 
    66things with these special "X-Headers" (so called because the HTTP spec demands 
    7 that custom headers are prefxed with "X-"). 
     7that custom headers are prefixed with "X-"). 
    88 
    99Next time you're at slashdot.org, watch out for X-Fry and X-Bender. :) 
     
    1818    """ 
    1919    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)): 
    2123        response['X-Object-Type'] = "%s.%s" % (model._meta.app_label, model._meta.object_name.lower()) 
    2224        response['X-Object-Id'] = str(object_id)