mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-12-28 07:18:59 +00:00
redirect after signup
This commit is contained in:
parent
2f242069ba
commit
3781a04965
1 changed files with 5 additions and 1 deletions
6
webui.py
6
webui.py
|
@ -1,4 +1,4 @@
|
|||
from flask import Flask, render_template, session, request
|
||||
from flask import Flask, render_template, session, request, redirect, url_for
|
||||
from flask_mysqldb import MySQL
|
||||
import bcrypt
|
||||
import json, hashlib
|
||||
|
@ -84,3 +84,7 @@ def do_signup():
|
|||
c.execute("INSERT INTO `users` (id, email, password) VALUES (%s, %s, %s)", (user_id, request.form['email'], pw))
|
||||
mysql.connection.commit()
|
||||
c.close()
|
||||
|
||||
# success!
|
||||
session['userid'] = user_id
|
||||
return redirect(url_for('home'))
|
||||
|
|
Loading…
Reference in a new issue