Make sessions permanent
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import os
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
class Config:
|
||||
"""Base configuration."""
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY', '234234sdfsdfsdfsdf345345')
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
|
||||
# Session and Remember Me configurations to keep user logged in almost indefinitely (10 years)
|
||||
PERMANENT_SESSION_LIFETIME = timedelta(days=3650)
|
||||
REMEMBER_COOKIE_DURATION = timedelta(days=3650)
|
||||
|
||||
class DevelopmentConfig(Config):
|
||||
"""Development configuration."""
|
||||
|
||||
Reference in New Issue
Block a user