-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.py
50 lines (42 loc) · 1.73 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
""" Configuration of app.config dict
"""
import os.path
import logging
log = logging.getLogger()
# flask-sqlalchemy
SQLALCHEMY_TRACK_MODIFICATIONS = False # explicitly remove deprecated feature
SQLALCHEMY_POOL_RECYCLE = 280 # https://help.pythonanywhere.com/pages/UsingSQLAlchemywithMySQL/
# flask-mail (used by flask-security)
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
# flask-security
SECURITY_CONFIRMABLE = True
SECURITY_REGISTERABLE = True
SECURITY_RECOVERABLE = True
SECURITY_TRACKABLE = True
SECURITY_CHANGEABLE = True
SECURITY_POST_LOGIN_VIEW = "/user_post_login"
SECURITY_POST_CONFIRM_VIEW = "/user_post_confirm_email"
SECURITY_EMAIL_SUBJECT_REGISTER = "Welcome to Mix-Mind Live"
SECURITY_EMAIL_SUBJECT_PASSWORD_NOTICE = "[Mix-Mind] Your password has been reset"
SECURITY_EMAIL_SUBJECT_PASSWORD_RESET = "[Mix-Mind] Password reset instructions"
SECURITY_EMAIL_SUBJECT_CONFIRM = "[Mix-Mind] Please confirm your email"
# logging
#path = app.config['LOGGING_PATH']
#os.makedirs(path, exist_ok=True)
#info_fh = RotatingFileHandler(os.path.join(path, 'mixmind.log'), maxBytes=10000000, backupCount=3)
#info_fh.setFormatter(logging.Formatter('%(asctime)s %(levelname)s: %(message)s [in %(pathname)s:%(lineno)d]'))
#info_fh.setLevel(logging.INFO)
#log = logging.getLogger()
# default recipes and ingredients to load
MIXMIND_DIR = os.path.abspath(os.path.curdir)
MIXMIND_RECIPES_DIR = "recipes/"
MIXMIND_INGREDIENTS_DIR = "mixmind/static/ingredients/"
MIXMIND_DEFAULT_RECIPES = ["recipes_schubar.json", "IBA_all.json"]
MIXMIND_DEFAULT_INGREDIENTS = ["ExampleBarstock.csv"]
MIXMIND_DEFAULT_BAR_NAME = u"Home Bar"
# time
TIMEZONE = 'US/Eastern'
HUMAN_FORMAT = 'ddd, D MMM YYYY, at LT'
PRECISE_FORMAT = 'YYYY-MM-DD HH:mm:ss'