pages get userinfo from session
parent
91e0d17385
commit
3de2f056ce
|
@ -24,12 +24,13 @@ nc.login('gia', 'gia0000!')
|
|||
|
||||
@bp.route("/", methods=("GET", "POST"))
|
||||
def index():
|
||||
return render_template("menu/upload.html")
|
||||
username = session["username"]
|
||||
return render_template("menu/upload.html", username=username)
|
||||
|
||||
|
||||
@bp.route('/uploader', methods = ['GET', 'POST'])
|
||||
def upload_file():
|
||||
print("heyy")
|
||||
user_id = session["user_id"]
|
||||
message = ""
|
||||
if request.method == 'POST':
|
||||
#flask gets the file
|
||||
|
@ -45,4 +46,4 @@ def upload_file():
|
|||
#card = Card(title=name, interest_rate=-1.0, owner_id=1, item_location=link, )
|
||||
#dbsession.add(card)
|
||||
#dbsession.commit()
|
||||
return render_template("menu/upload.html", message=message)
|
||||
return render_template("menu/upload.html", message=message, user_id=user_id)
|
Loading…
Reference in New Issue