コード例 #1
0
def edit_recipe(id):
    if "uuid" not in session:
        return redirect("/")

    return render_template(
        "editrecipe.html", 
        logged_in_user = User.get_by_id({"id": session['uuid']}),
        recipe = Recipe.get_one({"id" : id})
    )
コード例 #2
0
def dashboard():
    if "uuid" not in session:
        return redirect("/")
    
    return render_template(
        "dashboard.html", 
        logged_in_user = User.get_by_id({"id": session['uuid']}),
        all_recipes = Recipe.get_all()
    )
コード例 #3
0
ファイル: users.py プロジェクト: PPadilla44/user_cr
def show_edit(userid):
    data = {'id': userid}
    return render_template('edit.html', user=User.get_by_id(data))
コード例 #4
0
ファイル: users.py プロジェクト: PPadilla44/user_cr
def show_one(userid):
    data = {'id': userid}
    return render_template("show_one.html", user=User.get_by_id(data))
コード例 #5
0
def edit_user_page(id_num):
    data = {"id": id_num}
    return render_template("edit_user.html", user=User.get_by_id(data))
コード例 #6
0
def show_single_user_page(id_num):
    data = {"id": id_num}
    return render_template("show_single_user.html", user=User.get_by_id(data))
コード例 #7
0
def edit(id):
    data = {"id": int(id)}
    return render_template('index_edit.html', user=User.get_by_id(data))
コード例 #8
0
def new_recipe():
    if "uuid" not in session:
        return redirect("/")
#some wireframes expect you to dispaly the name of the logged in user on this page,then you would pass in
# the logged in user, other wireframes don't require it at all, just there to create a form so no need)
    return render_template("newrecipe.html", new_recipe = User.get_by_id({"id": session['uuid']}))
コード例 #9
0
def show_user_page(id):
    data = {'id': int(id)}
    return render_template('index_show.html', user=User.get_by_id(data))
コード例 #10
0
def display_users():
    if "uuid" not in session:
        flash("Must log in")
        return redirect('/')

    return render_template("users.html", all_users = User.get_all(), user = User.get_by_id({"id": session['uuid']}))
コード例 #11
0
def register_success(user_id):
    if 'user_id' not in session:
        return "You are not logged in <br><a href = '/'>" + "Click Here to Login</a>"
    data = {"user_id": user_id}
    return render_template('welcome.html', user=User.get_by_id(data))
コード例 #12
0
def edit_user(id):
    data = {"id": id}

    return render_template("edit.html", user=User.get_by_id(data))
コード例 #13
0
def read(id):
    data = {"id": id}
    return render_template("user.html", user=User.get_by_id(data))