def before_request(): if current_user.is_authenticated: registerTraceUsers(current_user.get_id(), request.endpoint) global therapistLiteral therapistLiteral = "{} {} {}".format(current_user.get_name(), current_user.get_surname1(), \ current_user.get_surname2()) else: #Trace for users is not added here because it will be spotted when redirecting the user return redirect(urlPrefix + url_for('auth.login'))
def before_request(): if current_user.is_authenticated: registerTraceUsers(current_user_get_id(), request.endpoint) else: registerTraceIPs(request.remote_addr, request.endpoint)