not smart bune
This commit is contained in:
parent
4f1561105d
commit
10041f9790
1 changed files with 3 additions and 2 deletions
3
web.py
3
web.py
|
@ -190,11 +190,12 @@ def do_login():
|
||||||
def create_password():
|
def create_password():
|
||||||
db, c, dc = db_reconnect()
|
db, c, dc = db_reconnect()
|
||||||
c.execute("SELECT COUNT(*) FROM data WHERE username = %s AND instance = %s", (session['username'], session['instance']))
|
c.execute("SELECT COUNT(*) FROM data WHERE username = %s AND instance = %s", (session['username'], session['instance']))
|
||||||
db.close()
|
|
||||||
if c.fetchone()[0] == 0:
|
if c.fetchone()[0] == 0:
|
||||||
|
db.close()
|
||||||
return render_template("create_password.html", bg = "background-image:url('{}')".format(session['avi']))
|
return render_template("create_password.html", bg = "background-image:url('{}')".format(session['avi']))
|
||||||
else:
|
else:
|
||||||
#user already exists in database, so they already have a password
|
#user already exists in database, so they already have a password
|
||||||
|
db.close()
|
||||||
return redirect(url_for('main'))
|
return redirect(url_for('main'))
|
||||||
|
|
||||||
@app.route('/internal/create_account', methods=['POST'])
|
@app.route('/internal/create_account', methods=['POST'])
|
||||||
|
|
Loading…
Reference in a new issue