-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
47 lines (36 loc) · 933 Bytes
/
config.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
43
44
45
46
47
"""
Configuration module
"""
# pylint: disable=too-few-public-methods
import os
class Config:
"""
Parent config class
"""
SITENAME = "Private-Net.work"
SERVICE_NAME = "Notes"
PROD_DOMAIN = "private-net.work"
LANGUAGES = {
"en": "English",
"ru": "Russian"
}
PROJECT = os.getcwd()
DB = f"{PROJECT}/data/db/main.db"
SUPPORT_EMAIL = f"support@{PROD_DOMAIN}"
ERROR_EMAIL = f"errors@{PROD_DOMAIN}"
MAIL_USE_TLS = False
MAIL_USE_SSL = True
ADMIN_PASSWORD = os.getenv("ADMIN_PASSWORD")
AUTH_COOKIE = os.getenv("AUTH_COOKIE")
TG_LOGGER_TOKEN = os.getenv("TG_LOGGER_TOKEN")
TG_ADMIN_ID = os.getenv("TG_ADMIN_ID")
class ProductionConfig(Config):
"""
Production config class
"""
DOMAIN = "https://private-net.work"
class DevelopmentConfig(Config):
"""
Development config class
"""
DOMAIN = "http://localhost:5000"