This is a simple Django Session Engine
that uses Firestore
as the database to store session data.
pip install django_firestore_session_engine
INSTALLED_APPS = [
...,
'django_firestore_session_engine'
]
SESSION_ENGINE = 'django_firestore_session_engine.engine'
FIRESTORE_SESSION_COL = FIRESTORE.collection("session")
Do not 'initialize' Firestore or 'import' initialized Firestore in more than one file while using it with Djnago. A good practice is to initialize firestore in the settings
file and import it from there.
This Engine was made based on what is described in the Djnago documentation on How to use sessions
and after some reverse-engineering of the existing session engines, especially the 'django.contrib.sessions.backends.db'
and 'django.contrib.sessions.backends.file'
engines.
Please send any comments and criticisms to the author here saif.resun@outlook.com
Cheers!