forked from cghall/EasyCRM
-
Notifications
You must be signed in to change notification settings - Fork 111
/
config.py
30 lines (24 loc) · 950 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os
class BaseConfig(object):
"""Standard configuration options"""
DEBUG = True
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, 'app.db')
SQLALCHEMY_MIGRATE_REPO = os.path.join(BASE_DIR, 'db_repository')
WTF_CSRF_ENABLED = False
DATABASE_CONNECT_OPTIONS = {}
THREADS_PER_PAGE = 2
SECRET_KEY = "secret"
BCRYPT_LOG_ROUNDS = 12
class TestConfig(BaseConfig):
"""Configuration for general testing"""
TESTING = True
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, 'test.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
WTF_CSRF_ENABLED = False
LOGIN_DISABLED = True
BCRYPT_LOG_ROUNDS = 4
class AuthTestConfig(TestConfig):
"""For testing authentication we want to require login to check validation works"""
LOGIN_DISABLED = False