Answer the question
In order to leave comments, you need to log in
How to configure flask to save session in Redis?
I'm trying to set up sessions with flask-session . When adding the last line to your config file
import os
import redis
POSTGRES = {
'user': 'dbuser',
'pw': 'dbadmin',
'db': 'beedb',
'host': 'localhost',
'port': '5432',
}
class Configuration(object):
DEBUG = True
SECRET_KEY = os.environ.get('SECRET_KEY') or 'e5ac358c-f0bf-11e5-9e39-d3b532c10a28'
SQLALCHEMY_DATABASE_URI = 'postgresql://%(user)s:%(pw)[email protected]%(host)s:%(port)s/%(db)s' % POSTGRES
SQLALCHEMY_TRACK_MODIFICATIONS = False
SESSION_TYPE = 'redis'
SESSION_REDIS = redis.from_url('localhost:6379')
ValueError: Redis URL must specify one of the followingschemes (redis://, rediss://, unix://)
Answer the question
In order to leave comments, you need to log in
Well... - and read the text of the error itself and specify the url ' redis://localhost:6379 ' as you are offered in the error itself - have you tried it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question