-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
56 lines (52 loc) · 2.09 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
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config():
DEBUG = False
SQLITE_DB_DIR = None
SQLALCHEMY_DATABASE_URI = None
SQLALCHEMY_TRACK_MODIFICATIONS = False
WTF_CSRF_ENABLED = False
SECURITY_TOKEN_AUTHENTICATION_HEADER = "Authentication-Token"
CELERY_BROKER_URL = "redis://localhost:6379/1"
CELERY_RESULT_BACKEND = "redis://localhost:6379/2"
CACHE_TYPE = "RedisCache"
CACHE_REDIS_HOST = "localhost"
CACHE_REDIS_PORT = 6379
class LocalDevelopmentConfig(Config):
SQLITE_DB_DIR = os.path.join(basedir) #requires folder?
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(SQLITE_DB_DIR,"database.sqlite3")
DEBUG = True
SECRET_KEY = '1v1u2v31yru1fr98rgw84'
SECURITY_PASSWORD_HASH = "bcrypt"
SECURITY_PASSWORD_SALT = "8eg7WA9ugr2b9fbyv784b"
SECURITY_REGISTERABLE = True
SECURITY_SEND_REGISTER_EMAIL = False
SECURITY_UNAUTHORIZED_PAGE = None
WTF_CSRF_ENABLED = False
CACHE_REDIS_HOST = "localhost"
CACHE_REDIS_PORT = 6379
CACHE_TYPE = "RedisCache"
CELERY_BROKER_URL = "redis://localhost:6379/1"
CELERY_RESULT_BACKEND = "redis://localhost:6379/2"
class ProdConfig(Config):
SQLITE_DB_DIR = os.path.join(basedir) #requires folder?
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(SQLITE_DB_DIR,"database.sqlite3")
DEBUG = False
class StageConfig(Config):
SQLITE_DB_DIR = os.path.join(basedir, "../db_directory")
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(SQLITE_DB_DIR, "testdb.sqlite3")
DEBUG = True
SECRET_KEY = "ash ah secet"
SECURITY_PASSWORD_HASH = "bcrypt"
SECURITY_PASSWORD_SALT = "really super secret" # Read from ENV in your case
SECURITY_REGISTERABLE = True
SECURITY_CONFIRMABLE = False
SECURITY_SEND_REGISTER_EMAIL = False
SECURITY_UNAUTHORIZED_VIEW = None
WTF_CSRF_ENABLED = False
CELERY_BROKER_URL = "redis://localhost:6379/1"
CELERY_RESULT_BACKEND = "redis://localhost:6379/2"
REDIS_URL = "redis://localhost:6379"
CACHE_TYPE = "RedisCache"
CACHE_REDIS_HOST = "localhost"
CACHE_REDIS_PORT = 6379