4 ms·
By default flask doesnt have a db. There is flask-sessions extensiom that does this for you.
by ddorian43 2y ago
By default flask doesnt have a db. There is flask-sessions extensiom that does this for you.
- shakna 2y agoOr you can just link to a DB directly. A Flask app is just a WSGI app. You can mount and extend it with any kind of Python, no extension necessary.
- ddorian43 2y agoThat's what the extension does for you.
- samsonradu 2y agoCan't session data be stored on disk? that's the default PHP behavior.
- ddorian43 2y agoBecause you might have multiple webservers.
- samsonradu 2y agoThere are solutions for that: Shared NAS, sticky sessions etc.
- ddorian43 2y agoGood luck with maintaining that NAS. Your sticky sessions will logout all users on a server that goes down. It's better to have a db. Please stop.
- samsonradu 2y agoOf course it's better to have a db doh... I'm replying to your > By default flask doesnt have a db.
- ddorian43 2y agoPeople don't have NAS laying around. And don't use a filesystem as a db, especially a remote filesystem.