config.py 741 Bytes
Newer Older
Vladislav Rykov's avatar
Vladislav Rykov committed
1
2
3
4
5
6
7
8
9
10
11
12
13
class Config(object):
    DEBUG = False
    TESTING = False

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

    DB_NAME = 'gateway'
    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
17

    APPKEY_LENGTH = 8
    DATA_DOWNLOAD_DIR = 'data'
18
19
20
21
    DATA_DOWNLOAD_DIR_OS = 'app/data'

    # in minutes - 24 hours by default
    MAINTAINER_INTERVAL = 1440
Vladislav Rykov's avatar
Vladislav Rykov committed
22
23
24
25
26
27
28
29

class ProductionConfig(Config):
    pass

class DevelopmentConfig(Config):
    DEBUG = True

    SESSION_COOKIE_SECURE = False
Vladislav Rykov's avatar
Vladislav Rykov committed
30
    REMEMBER_COOKIE_SECURE = False
Vladislav Rykov's avatar
Vladislav Rykov committed
31
32
33
34
35
36
    

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