-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
executable file
·70 lines (58 loc) · 2.09 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
65
66
67
68
# -*- coding: utf-8 -*-
import os
os_env = os.environ
class Config(object):
SECRET_KEY = '3nF3Rn0'
APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory
PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir))
ASSETS_DEBUG = False
DEBUG_TB_ENABLED = False # Disable Debug toolbar
DEBUG_TB_INTERCEPT_REDIRECTS = False
UPLOAD_FOLDER = '/static/img/uploads'
CACHE_TYPE = 'simple' # Can be "memcached", "redis", etc.
BROKER_URL = 'redis://localhost:6379/10'
REDIS_URL = 'redis://localhost:6379/10'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/10'
MONGODB_SETTINGS = {
'db': 'houzee'
}
#security
SECURITY_REGISTERABLE = True
SECURITY_RECOVERABLE = True
SECURITY_CONFIRMABLE = False
SECURITY_CHANGEABLE = True
SECURITY_TRACKABLE = True
SECURITY_PASSWORD_HASH = 'bcrypt'
SECURITY_PASSWORD_SALT = '3nF3Rn0'
SECURITY_POST_LOGIN_VIEW = '/resident?m=l'
SECURITY_POST_CONFIRM_VIEW = '/resident?m=l'
SECURITY_POST_REGISTER_VIEW = '/township?s=t'
SECURITY_SEND_REGISTER_EMAIL = False
SECURITY_POST_CHANGE_VIEW = '/profile'
SECURITY_UNAUTHORIZED_VIEW = '/profile'
#flask mail settings - Mailgun
MAIL_SERVER = 'smtp.mailgun.com'
MAIL_PORT = 465
MAIL_USE_SSL = True
MAIL_USERNAME = '[email protected]'
MAIL_PASSWORD = 'davajvmasd123456'
MAIL_DEFAULT_SENDER = '[email protected]'
SECURITY_EMAIL_SENDER = '[email protected]'
class ProdConfig(Config):
"""Production configuration."""
ENV = 'prod'
DEBUG = False
DEBUG_TB_ENABLED = False # Disable Debug toolbar
class DevConfig(Config):
"""Development configuration."""
ENV = 'dev'
DEBUG = False
DEBUG_TB_ENABLED = False
ASSETS_DEBUG = False # Don't bundle/minify static assets
CACHE_TYPE = 'simple' # Can be "memcached", "redis", etc.
BROKER_URL = 'redis://localhost:6379/10'
REDIS_URL = 'redis://localhost:6379/10'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/10'
MONGODB_SETTINGS = {
'db': 'houzee'
}