-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
47 lines (35 loc) · 1.17 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
import os
from datetime import timedelta
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
DEVELOPMENT = True
DEBUG = True
TESTING = False
CSRF_ENABLED = True
SECRET_KEY = 'this-really-needs-to-be-changed'
#SQLALCHEMY_DATABASE_URI = 'mysql://AlmazenAPI:S1403p++@localhost/almazen-db'
SERVER_NAME = '127.0.0.1:5000'
JWT_SECRET_KEY = 'my-super-secret'
JWT_ACCESS_TOKEN_EXPIRES = timedelta(days=1)
JWT_REFRESH_TOKEN_EXPIRES = timedelta(days=1)
class ProductionConfig(Config):
DEBUG = False
DEVELOPMENT = False
TESTING = False
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
class StagingConfig(Config):
DEVELOPMENT = False
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
class DevelopmentConfig(Config):
DEVELOPMENT = True
DEBUG = True
TESTING = False
SQLALCHEMY_DATABASE_URI = 'mysql://AlmazenAPI:S1403p++@localhost/almazen-db'
class TestingConfig(Config):
DEVELOPMENT = True
DEBUG = True
TESTING = True
SQLALCHEMY_DATABASE_URI = 'mysql://AlmazenAPI:S1403p++@localhost/almazen-db'
PROPAGATE_EXCEPTIONS = True