Source

django-lockdown / lockdown / decorators.py

Full commit
1
2
3
4
5
6
7
8
try:
    from django.utils.decorators import decorator_from_middleware_with_args
except ImportError:
    from lockdown.decutils import decorator_from_middleware_with_args

from lockdown.middleware import LockdownMiddleware

lockdown = decorator_from_middleware_with_args(LockdownMiddleware)