Changeset 5870 for django/trunk/django/core/xheaders.py
- Timestamp:
- 08/12/07 05:29:59 (1 year ago)
- Files:
-
- django/trunk/django/core/xheaders.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/xheaders.py
r4090 r5870 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 pref xed 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. :) … … 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)
