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:
parent
2ed7c96434
commit
0895444405
1 changed files with 8 additions and 0 deletions
8
webui.py
8
webui.py
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue