def view_decorator(func):

    def wrapper(request, *args, **kwargs):
        return view_or_basicauth(func, request, (lambda u: u.has_perm(perm)), realm, *args, **kwargs)
    return wrapper
def view_decorator(func):

    def wrapper(request, *args, **kwargs):
        return view_or_basicauth(func, request, (lambda u: u.has_perm(perm)), realm, *args, **kwargs)
    return wrapper