config.py 803 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
    # manual user signup by default
    USERS_SIGNUP = False

Vladislav Rykov's avatar
Vladislav Rykov committed
26
27
28
29
30
31
32
class ProductionConfig(Config):
    pass

class DevelopmentConfig(Config):
    DEBUG = True

    SESSION_COOKIE_SECURE = False
Vladislav Rykov's avatar
Vladislav Rykov committed
33
    REMEMBER_COOKIE_SECURE = False
Vladislav Rykov's avatar
Vladislav Rykov committed
34
35
36
37
38
39
    

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