Ticket #3828: 4828-fix-request-access.2.diff
File 4828-fix-request-access.2.diff, 754 bytes (added by , 18 years ago) |
---|
-
django/core/context_processors.py
42 42 43 43 return context_extras 44 44 45 class TemplateRequestWrapper(object): 46 def __init__(self, request): 47 self._request = request 48 def __repr__(self): 49 return self._request.__repr__() 50 def __getattr__(self, name): 51 return getattr(self._request, name) 52 45 53 def request(request): 46 return {'request': request}54 return {'request': TemplateRequestWrapper(request)} 47 55 48 56 # PermWrapper and PermLookupDict proxy the permissions system into objects that 49 57 # the template system can understand.