seltsames Session kram

This commit is contained in:
2000-Trek 2023-06-09 22:39:09 +02:00
parent f141e2be49
commit 2090725f40

View file

@ -1,6 +1,7 @@
import queue import queue
from flask import Flask, render_template, request, make_response, session from flask import Flask, render_template, request, make_response, session
from flask_socketio import SocketIO #https://pythonprogramminglanguage.com/python-flask-websocket/ from flask_socketio import SocketIO #https://pythonprogramminglanguage.com/python-flask-websocket/
from flask.ext.session import Session
import sqlite3 import sqlite3
import time import time
import atexit import atexit
@ -13,8 +14,10 @@ c = conn.cursor()
app = Flask(__name__) app = Flask(__name__)
key = str(uuid.uuid4().hex) key = str(uuid.uuid4().hex)
SESSION_TYPE = 'redis'
print(key) print(key)
app.secret_key = key app.secret_key = key
Session(app)
socketio = SocketIO(app) socketio = SocketIO(app)