working on cross-session problem #18
parent
516340f2b4
commit
ba7ecb3282
8
app.py
8
app.py
|
@ -21,6 +21,8 @@ from EagleEyev3 import *
|
||||||
from settings import config
|
from settings import config
|
||||||
|
|
||||||
|
|
||||||
|
SECRET_KEY = "this needs to be changed to something unique and not checked into git"
|
||||||
|
|
||||||
|
|
||||||
# check if it could pull in a config object from settings.py
|
# check if it could pull in a config object from settings.py
|
||||||
if config:
|
if config:
|
||||||
|
@ -34,6 +36,9 @@ if config:
|
||||||
if 'log_level' in config:
|
if 'log_level' in config:
|
||||||
logger.setLevel(config['log_level'])
|
logger.setLevel(config['log_level'])
|
||||||
|
|
||||||
|
if 'client_secret' in config:
|
||||||
|
SECRET_KEY = config['client_secret']
|
||||||
|
|
||||||
else:
|
else:
|
||||||
logging.setLevel(config['INFO'])
|
logging.setLevel(config['INFO'])
|
||||||
|
|
||||||
|
@ -45,7 +50,10 @@ logging.info(f"Using EagleEyev3 version {EagleEyev3.__version__}")
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
app.secret_key = SECRET_KEY
|
||||||
SESSION_TYPE = 'filesystem'
|
SESSION_TYPE = 'filesystem'
|
||||||
|
SESSION_PERMANENT = False
|
||||||
|
PERMANENT_SESSION_LIFETIME = 60 * 60 * 24 * 7 # one week in seconds
|
||||||
app.config.from_object(__name__)
|
app.config.from_object(__name__)
|
||||||
Session(app)
|
Session(app)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue