-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
42 lines (38 loc) · 1.1 KB
/
settings.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
from os import environ
# Bot specific settings
BOT_ACTIONS = [
'minprice',
'maxprice',
'minfloor',
'maxfloor',
'minsurface',
'maxsurface',
'minrooms',
'maxrooms',
]
BOT_ACTIONS_TO_HUMAN = {
'minprice': 'Minimum price: ',
'maxprice': 'Maximum price: ',
'minfloor': 'Lowest floor: ',
'maxfloor': 'Highest floor: ',
'minsurface': 'Minimum surface (in sqm) ',
'maxsurface': 'Maximum surface (in sqm) ',
'minrooms': 'Minimum number of rooms: ',
'maxrooms': 'Maximum number of rooms: ',
}
BOT_TOKEN = environ.get('BOT_TOKEN')
# DB persistence settings
WITH_DB_PERSISTENCE = True
PERSISTENCE_FILE = 'settings.pickle'
POSTGRES_USER = environ.get('POSTGRES_USER', 'postgres')
POSTGRES_PASSWORD = environ.get('POSTGRES_PASSWORD')
POSTGRES_HOST = environ.get('POSTGRES_HOST', 'localhost')
POSTGRES_PORT = environ.get('POSTGRES_PORT')
POSTGRES_DB = environ.get('POSTGRES_DB')
POSTGRES_DB_STRING = 'postgres://{user}:{password}@{host}:{port}/{db}'.format(
user=POSTGRES_USER,
password=POSTGRES_PASSWORD,
host=POSTGRES_HOST,
port=POSTGRES_PORT,
db=POSTGRES_DB
)