-
Notifications
You must be signed in to change notification settings - Fork 4
/
settings.py
36 lines (29 loc) · 1.18 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
import os
import tornado
from tornado.options import define, options
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
define('port', default=8887, help="run on the given port", type=int)
define('debug', default=True, help='debug mode')
tornado.options.parse_command_line()
settings = {}
settings['debug'] = options.debug
settings['static_path'] = os.path.join(BASE_DIR, 'static')
settings['template_path'] = os.path.join(BASE_DIR, 'templates')
settings['cookie_secret'] = os.environ.get('SECRET_TOKEN', '__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__')
settings['xsrf_cookies'] = True
settings['login_url'] = '/auth/login/'
from modules.modules import SearchBar, DeleteModal, CreateModal, EditModal
settings['ui_modules'] = {'SearchBar': SearchBar, 'DeleteModal': DeleteModal,
'CreateModal': CreateModal, 'EditModal': EditModal}
DATABASES = {
'default': {
'ENGINE': 'postgresql+psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': 'psobbst5',
'HOST': 'localhost',
'PORT': '5432',
}
}
url_placeholder = '{ENGINE}://{USER}:{PASSWORD}@{HOST}:{PORT}/{NAME}'
url = url_placeholder.format(**DATABASES['default'])