def login_required(wrapped):
    def wrapper(request):
        result = wrapped(request)
        if not authenticated_userid(request):
            flash(_('Not logged in, please log in'), 'error')
            return HTTPFound(location=route_url('apex_login', request))
    return wrapper
login_requred - Decorator to be used if you don't want to use
dataset/ETHPy150Open cd34/apex/apex/decorators.py/login_required