not smart bune

This commit is contained in:
Lynne Megido 2018-11-14 01:16:29 +10:00
parent 4f1561105d
commit 10041f9790
Signed by: lynnesbian
GPG Key ID: FB7B970303ACE499

3
web.py
View File

@ -190,11 +190,12 @@ def do_login():
def create_password():
db, c, dc = db_reconnect()
c.execute("SELECT COUNT(*) FROM data WHERE username = %s AND instance = %s", (session['username'], session['instance']))
db.close()
if c.fetchone()[0] == 0:
db.close()
return render_template("create_password.html", bg = "background-image:url('{}')".format(session['avi']))
else:
#user already exists in database, so they already have a password
db.close()
return redirect(url_for('main'))
@app.route('/internal/create_account', methods=['POST'])