1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-12-28 07:18:59 +00:00

redirect after signup

This commit is contained in:
Lynne Megido 2019-09-01 17:16:52 +10:00
parent 2f242069ba
commit 3781a04965

View file

@ -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'))