Example #1
0
def home():
    #  logging out the user in Del Norte Eats and redirecting the user to the home page
    if current_user.is_authenticated:
        model_logout_all()
        return render_template("index.html")
    else:
        return render_template("index.html")
Example #2
0
def user_nav():
    if current_user.is_authenticated:
        #  if the runner is logged in as a customer, they will be logged out
        #  redirected to the login page of the user page
        model_logout_all()
        return redirect(url_for('easter_egg_bp.index'))
    else:
        #  if the runner is not logged in they will be redirected to the login runner page
        return redirect(url_for('easter_egg_bp.index'))
Example #3
0
def runner_nav():
    if current_user.is_authenticated:
        #  if the user is logged in as a customer, they will be logged out
        #  redirected to the login page of the runner page
        model_logout_all()
        return render_template("easter_egg/runner/login_runner.html")
    else:
        #  if the user is not logged in as a customer, they will be redirected to the login runner page
        return render_template("easter_egg/runner/login_runner.html")
Example #4
0
def logout():
    #  logging out the user and redirect the user back tot he user dashboard
    if request.method == "POST":
        model_logout_all()
        result = dash_handel()
        return result

    # if the input type was not a post form, if the logout was in the nav bar
    model_logout_all()
    result = dash_handel()
    return result
Example #5
0
def logout_rr():
    #  this is the route on the runner dashboard to reroute the runner back to the runner login
    if request.method == "POST":
        model_logout_all()
        return render_template("easter_egg/runner/login_runner.html")
Example #6
0
def logout():
    if request.method == "POST":
        model_logout_all()
        #logout_user()
        return redirect(url_for('time_to_thrift_bp.login'))