mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
read secret key from json file
This commit is contained in:
parent
bc0dcfb754
commit
aea1cc7ccc
2 changed files with 5 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
__pycache__
|
__pycache__
|
||||||
|
config.json
|
||||||
|
|
5
webui.py
5
webui.py
|
@ -1,7 +1,10 @@
|
||||||
from flask import Flask, render_template, session
|
from flask import Flask, render_template, session
|
||||||
|
import json
|
||||||
|
|
||||||
|
cfg = json.load(open("config.json"))
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.secret_key = "debug key"
|
app.secret_key = cfg['secret_key']
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def hello():
|
def hello():
|
||||||
|
|
Loading…
Reference in a new issue