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