This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
61 lines (50 loc) · 1.87 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import os
ACCT='python'
PW=os.environ.get('PW') or 'password'
class Config:
"""The default config object."""
HASH_REGISTRATION = os.environ.get('BETA') or False
CSP = {
}
DESCRIPTION = (
os.environ.get('ICC_DESCRIPTION') or "anno.wiki is a wiki for "
"annotations, footnotes, and explanations of literature and texts.")
DEBUG = os.environ.get('ICC_DEBUG') or False
TESTING = os.environ.get('ICC_TESTING') or False
SEARCH_ON = os.environ.get('SEARCH_ON') or False
HEARTBEAT = False
TEMPLATES_AUTO_RELOAD = True
ADMINS = ['[email protected]', '[email protected]']
LOG_TO_STDOUT = os.environ.get('LOG_TO_STDOUT')
ENABLE_ASYNC = os.environ.get('ASYNC')
LOG_POWER = False
# mail system
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
MAIL_PORT = int(os.environ.get('MAIL_PORT') or 25)
MAIL_SERVER = os.environ.get('MAIL_SERVER')
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None
MAIL_USE_SSL = os.environ.get('MAIL_USE_SSL') is not None
# vote margins
VOTES_FOR_APPROVAL = 2
VOTES_FOR_REJECTION = -2
VOTES_FOR_REQUEST_REJECTION = -10000000000000
VOTES_FOR_REQUEST_APPROVAL = 100000000000000
# per pages
ANNOTATIONS_PER_PAGE = 5
ANNOTATIONS_PER_SEARCH_PAGE = 5
CARDS_PER_PAGE = 12
COMMENTS_PER_PAGE = 25
LINES_PER_PAGE = 30
LINES_PER_SEARCH_PAGE = 10
NOTIFICATIONS_PER_PAGE = 15
USER_PAGE_AVATAR_SIZE = 128
TIME = '%I:%M %p %m/%d/%y (UTC)'
# technicals
SECRET_KEY = os.environ.get('SECRET_KEY') or 'securitybreach'
ELASTICSEARCH_URL = os.environ.get('ELASTICSEARCH_URL')
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or\
f'mysql+pymysql://{ACCT}:{PW}@localhost/'\
'icc?charset=utf8mb4'
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ECHO = False