I am attempting to implement Flask-Session in my python application. I read in the docs that its recommended to use another interface like the SqlAlchemySessionInterface
instead of the default NullSessionInterface
which is used when nothing is provided to the SESSION_TYPE
configuration key.
From the flask_session/init.py file under class Session it reads
By default Flask-Session will use :class:
NullSessionInterface
, you really should configurate your app to use a different SessionInterface.
After setting the SESSION_TYPE
configuration key to "sqlalchemy"
I get an error
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "sessions" does not exist
This indicates that Flask-Session is looking to use a table with the name "sessions" in my database model but I cannot find anywhere in the Flask-Session documentation where it points out that a table should be created and what fields it should have.
Can anyone suggest a solution to this please?