def METHOD_NAME(function=None):
    """
    Decorator for views that checks that the user is a super user redirecting
    to the log-in page if necessary.
    Inspired by Django 'login_required' decorator
    """
    actual_decorator = user_passes_test(lambda u: u.is_superuser)
    if function:
        return actual_decorator(function)
    return actual_decorator