forked from usgo/online-ratings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
42 lines (28 loc) · 1.06 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class BaseConfiguration(object):
DEBUG = False
TESTING = False
ADMINS = frozenset(['[email protected]'])
SECRET_KEY = 'SecretKeyForSessionSigning'
THREADS_PER_PAGE = 8
DATABASE = 'app.db'
DATABASE_PATH = os.path.join(basedir, DATABASE)
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + DATABASE_PATH
SECURITY_PASSWORD_HASH = 'sha512_crypt'
SECURITY_PASSWORD_SALT = 'SuPeRsEcReTsAlT'
SECURITY_POST_LOGIN_VIEW = '/LatestGames'
SECURITY_CHANGEABLE = True
SECURITY_REGISTERABLE = True
SECURITY_TRACKABLE = True
SECURITY_SEND_REGISTER_EMAIL = False
SECURITY_SEND_PASSWORD_CHANGE_EMAIL = False
SECURITY_SEND_PASSWORD_RESET_NOTICE_EMAIL = False
MAIL_SUPPRESS_SEND = True
class TestConfiguration(BaseConfiguration):
TESTING = True
DATABASE = 'tests.db'
DATABASE_PATH = os.path.join(basedir, DATABASE)
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:' # + DATABASE_PATH
class DebugConfiguration(BaseConfiguration):
DEBUG = True