Ticket #1015: middleware_decorators.diff

File middleware_decorators.diff, 594 bytes (added by anonymous, 18 years ago)

Usage is in the comments

  • django/utils/decorators.py

     
    3030                    return result
    3131            return response
    3232        return _wrapped_view
     33
     34    def _proper_2_4_decorator(*args, **kwargs):
     35        def _decorator(f):
     36            return _decorator_from_middleware(f, *args, **kwargs)
     37        return _decorator
     38
     39    _decorator_from_middleware.decorator = _proper_2_4_decorator
     40   
    3341    return _decorator_from_middleware
Back to Top