config.py 1.09 KB
Newer Older
Vladislav Rykov's avatar
Vladislav Rykov committed
1
2
3
4
class Config(object):
    DEBUG = False
    TESTING = False

5
    SECRET_KEY = 'al1DuE8cFpk3EJNlFHG73Fd'
Vladislav Rykov's avatar
Vladislav Rykov committed
6

7
    DB_NAME = 'iotserver'
Vladislav Rykov's avatar
Vladislav Rykov committed
8
9
10
11
12
13
    DB_USERNAME = 'pi'
    DB_PASSWORD = 'dev'
    DB_HOST = 'localhost'
    DB_PORT = 5432

    SESSION_COOKIE_SECURE = True
Vladislav Rykov's avatar
Vladislav Rykov committed
14
    REMEMBER_COOKIE_SECURE = True
Vladislav Rykov's avatar
Vladislav Rykov committed
15
16

    APPKEY_LENGTH = 8
17
    NID_LENGTH = 5
Vladislav Rykov's avatar
Vladislav Rykov committed
18
    DATA_DOWNLOAD_DIR = 'data'
19
20
21
22
    DATA_DOWNLOAD_DIR_OS = 'app/data'

    # in minutes - 24 hours by default
    MAINTAINER_INTERVAL = 1440
Vladislav Rykov's avatar
Vladislav Rykov committed
23

24
25
26
    # manual user signup by default
    USERS_SIGNUP = False

Vladislav Rykov's avatar
Vladislav Rykov committed
27
28
29
30
31
32
    # mail server config
    MAIL_SERVER = 'smtp.gmail.com'
    MAIL_PORT = 465
    MAIL_USE_SSL = True
    MAIL_USERNAME = 'hpcaiotserver@gmail.com'
    MAIL_PASSWORD = 'HPC&A10T.'
33
34
35
36
    MAIL_DEFAULT_SENDER = 'hpcaiotserver@gmail.com'

    # in minutes
    FIRE_NOTIFICATIONS_INTERVAL = 1
Vladislav Rykov's avatar
Vladislav Rykov committed
37

Vladislav Rykov's avatar
Vladislav Rykov committed
38
39
40
41
42
43
44
class ProductionConfig(Config):
    pass

class DevelopmentConfig(Config):
    DEBUG = True

    SESSION_COOKIE_SECURE = False
Vladislav Rykov's avatar
Vladislav Rykov committed
45
    REMEMBER_COOKIE_SECURE = False
Vladislav Rykov's avatar
Vladislav Rykov committed
46
47
48
49
50
51
    

class TestingConfig(Config):
    TESTING = True
    
    SESSION_COOKIE_SECURE = False
Vladislav Rykov's avatar
Vladislav Rykov committed
52
    REMEMBER_COOKIE_SECURE = False