This repository has been archived on 2021-09-15. You can view files and clone it, but cannot push or open issues or pull requests.
M2OLA/backend/app/config.py

33 lines
829 B
Python
Raw Normal View History

2017-01-20 16:04:12 +00:00
import os
class Config:
DEBUG = False
TESTING = False
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = \
'sqlite:///' + os.path.join(BASE_DIR, '../app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
THREADS_PER_PAGE = 2
SECRET_KEY = "secret"
BUNDLE_ERRORS = True
SESSION_COOKIE_SECURE = True
SESSION_VALIDITY_DURATION_WITHOUT_ACTIVITY_MIN = 20
class Prod(Config):
SQLALCHEMY_DATABASE_URI = 'mysql://user@localhost/foo'
class Debug(Config):
DEBUG = True
SESSION_COOKIE_SECURE = False
2017-01-20 13:07:59 +00:00
SQLALCHEMY_DATABASE_URI = 'mysql://ola:ola@localhost/OLA'
2017-01-20 16:04:12 +00:00
class Test(Config):
TESTING = True
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = \
'sqlite:///' + os.path.join(BASE_DIR, '../test.db')