1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 16:48:58 +00:00

prepare for backend dev

This commit is contained in:
Lynne Megido 2019-09-01 15:19:30 +10:00
parent 2ed7c96434
commit 0895444405

View file

@ -1,4 +1,5 @@
from flask import Flask, render_template, session from flask import Flask, render_template, session
from flask_mysqldb import MySQL
import json import json
cfg = json.load(open("config.json")) cfg = json.load(open("config.json"))
@ -6,6 +7,13 @@ 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_DB'] = cfg['db_name']
# app.config['MYSQL_USER'] = cfg['db_user']
# app.config['MYSQL_PASSWORD'] = cfg['db_password']
# mysql = MySQL(app)
@app.route("/") @app.route("/")
def hello(): def hello():
session['userid'] = 1 session['userid'] = 1