1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

enable mysql, remove hardcoded session stuff

This commit is contained in:
Lynne Megido 2019-09-01 16:28:45 +10:00
parent 44dda79d9a
commit adc39d1a15

View file

@ -7,17 +7,15 @@ cfg = json.load(open("config.json"))
app = Flask(__name__) app = Flask(__name__)
app.secret_key = cfg['secret_key'] app.secret_key = cfg['secret_key']
# app.config['MYSQL_HOST'] = cfg['db_host'] app.config['MYSQL_HOST'] = cfg['db_host']
# app.config['MYSQL_DB'] = cfg['db_name'] app.config['MYSQL_DB'] = cfg['db_name']
# app.config['MYSQL_USER'] = cfg['db_user'] app.config['MYSQL_USER'] = cfg['db_user']
# app.config['MYSQL_PASSWORD'] = cfg['db_password'] app.config['MYSQL_PASSWORD'] = cfg['db_pass']
# mysql = MySQL(app) mysql = MySQL(app)
@app.route("/") @app.route("/")
def hello(): def home():
session['userid'] = 1
# session.clear()
if 'userid' in session: if 'userid' in session:
session['step'] = 1 session['step'] = 1
return render_template("home.html") return render_template("home.html")
@ -62,7 +60,4 @@ def bot_accounts_add():
@app.route("/bot/create/") @app.route("/bot/create/")
def bot_create(): def bot_create():
session['step'] = 4
session['instance'] = "botsin.space"
session['instance_type'] = "Mastodon"
return render_template("bot_create.html") return render_template("bot_create.html")