pages get userinfo from session
parent
91e0d17385
commit
3de2f056ce
|
@ -24,12 +24,13 @@ nc.login('gia', 'gia0000!')
|
||||||
|
|
||||||
@bp.route("/", methods=("GET", "POST"))
|
@bp.route("/", methods=("GET", "POST"))
|
||||||
def index():
|
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'])
|
@bp.route('/uploader', methods = ['GET', 'POST'])
|
||||||
def upload_file():
|
def upload_file():
|
||||||
print("heyy")
|
user_id = session["user_id"]
|
||||||
message = ""
|
message = ""
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
#flask gets the file
|
#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, )
|
#card = Card(title=name, interest_rate=-1.0, owner_id=1, item_location=link, )
|
||||||
#dbsession.add(card)
|
#dbsession.add(card)
|
||||||
#dbsession.commit()
|
#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