def logout_required(redirect):
 def redirect_func(user):
  return user.is_authenticated()
 if hasattr(redirect, '__call__'):
  return user_access_decorator(redirect_func, redirect_field=None, redirect_url_func=(lambda : reverse('home')))(redirect)
 else:
  return user_access_decorator(redirect_func, redirect_field=None, redirect_url_func=(lambda : redirect))

def logout_required ( redirect ) : def redirect_func ( user ) : return user . is_authenticated ( ) if hasattr ( redirect , '__call__' ) : return user_access_decorator ( redirect_func , redirect_field = None , redirect_url_func = ( lambda : reverse ( 'home' ) ) ) ( redirect ) else : return user_access_decorator ( redirect_func , redirect_field = None , redirect_url_func = ( lambda : redirect ) )
requires that the user *not* be logged in .