diff --git a/upload.py b/upload.py index bcecba8..5ed4e0e 100644 --- a/upload.py +++ b/upload.py @@ -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) \ No newline at end of file + return render_template("menu/upload.html", message=message, user_id=user_id) \ No newline at end of file