-
Notifications
You must be signed in to change notification settings - Fork 30
/
settings.py
64 lines (49 loc) · 1.27 KB
/
settings.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# coding: utf-8
"""
settings
~~~~~~~~
Global settings for project.
:copyright: (c) 2015 by Roman Zaiev.
:license: BSD, see LICENSE for more details.
"""
import os
class BaseConfig(object):
DEBUG = False
SECRET_KEY = "MY_VERY_SECRET_KEY"
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db'
SQLALCHEMY_TRACK_MODIFICATIONS = False
CSRF_ENABLED = True
ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
BLUEPRINTS = [
'base.base',
'info.info',
]
EXTENSIONS = [
'ext.db',
'ext.assets',
'ext.login_manager',
'ext.gravatar',
'ext.toolbar',
]
CONTEXT_PROCESSORS = [
'base.context_processors.common_context',
'base.context_processors.navigation',
'base.context_processors.common_forms',
]
CSS_BASE_BUNDLE = [
'css/reset.css',
'css/typo.css',
'css/style.css',
'css/page.css',
'css/forms.css',
]
JS_BASE_BUNDLE = [
'js/vendors/jquery-3.3.1.js',
]
class DevelopmentConfig(BaseConfig):
DEBUG = True
DEBUG_TB_PROFILER_ENABLED = True
DEBUG_TB_INTERCEPT_REDIRECTS = False
class TestingConfig(BaseConfig):
TESTING = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'