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

    SECRET_KEY = b'ksj^*(s90*Dklds;osdj'

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
33
    # mail server config
    MAIL_SERVER = 'smtp.gmail.com'
    MAIL_PORT = 465
    MAIL_USE_SSL = True
    MAIL_USERNAME = 'hpcaiotserver@gmail.com'
    MAIL_PASSWORD = 'HPC&A10T.'

Vladislav Rykov's avatar
Vladislav Rykov committed
34
35
36
37
38
39
40
class ProductionConfig(Config):
    pass

class DevelopmentConfig(Config):
    DEBUG = True

    SESSION_COOKIE_SECURE = False
Vladislav Rykov's avatar
Vladislav Rykov committed
41
    REMEMBER_COOKIE_SECURE = False
Vladislav Rykov's avatar
Vladislav Rykov committed
42
43
44
45
46
47
    

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