Changeset 7176 for django/branches/gis/django/views/decorators
- Timestamp:
- 02/28/08 15:24:51 (10 months ago)
- Files:
-
- django/branches/gis (modified) (1 prop)
- django/branches/gis/django/views/decorators/cache.py (modified) (3 diffs)
- django/branches/gis/django/views/decorators/http.py (modified) (2 diffs)
- django/branches/gis/django/views/decorators/vary.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/gis
- Property svnmerge-integrated changed from /django/trunk:1-7102 to /django/trunk:1-7175
django/branches/gis/django/views/decorators/cache.py
r4265 r7176 11 11 account on caching -- just like the middleware does. 12 12 """ 13 14 try: 15 from functools import wraps 16 except ImportError: 17 from django.utils.functional import wraps # Python 2.3, 2.4 fallback. 13 18 14 19 from django.utils.decorators import decorator_from_middleware … … 27 32 return response 28 33 29 return _cache_controlled34 return wraps(viewfunc)(_cache_controlled) 30 35 31 36 return _cache_controller … … 40 45 add_never_cache_headers(response) 41 46 return response 42 return _wrapped_view_func47 return wraps(view_func)(_wrapped_view_func) django/branches/gis/django/views/decorators/http.py
r4265 r7176 2 2 Decorators for views based on HTTP headers. 3 3 """ 4 5 try: 6 from functools import wraps 7 except ImportError: 8 from django.utils.functional import wraps # Python 2.3, 2.4 fallback. 4 9 5 10 from django.utils.decorators import decorator_from_middleware … … 25 30 return HttpResponseNotAllowed(request_method_list) 26 31 return func(request, *args, **kwargs) 27 return inner32 return wraps(func)(inner) 28 33 return decorator 29 34 django/branches/gis/django/views/decorators/vary.py
r4265 r7176 1 try: 2 from functools import wraps 3 except ImportError: 4 from django.utils.functional import wraps # Python 2.3, 2.4 fallback. 5 1 6 from django.utils.cache import patch_vary_headers 2 7 … … 17 22 patch_vary_headers(response, headers) 18 23 return response 19 return inner_func24 return wraps(func)(inner_func) 20 25 return decorator 21 26 … … 33 38 patch_vary_headers(response, ('Cookie',)) 34 39 return response 35 return inner_func40 return wraps(func)(inner_func)
