-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
49 lines (38 loc) · 1.64 KB
/
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
48
49
import os
from dotenv import load_dotenv
load_dotenv()
class Config(object):
# Основные настройки
DEBUG = False # if os.environ.get('FLASK_ENV') == 'development' else False
TESTING = False
SECRET_KEY = os.getenv('SECRET_KEY')
SEND_FILE_MAX_AGE_DEFAULT = 0
IMAGES_PATH = ['static']
IMAGE_OUTPUT = 'output'
# База данных
SQLALCHEMY_TRACK_MODIFICATIONS = False
DBHOST = 'server216.hosting.reg.ru' if DEBUG else 'localhost'
SQLALCHEMY_DATABASE_URI = f'mysql+mysqlconnector://' \
f'{os.getenv("DB_USER")}:{os.getenv("DB_PASS")}' \
f'@{DBHOST}/u0988708_corallib'
# Авторизация OAuth
YANDEX_CLIENT = os.getenv('YANDEX_CLIENT')
YANDEX_TOKEN = os.getenv('YANDEX_TOKEN')
YANDEX_AUTHORIZE_URL = 'https://oauth.yandex.ru/'
YANDEX_LOGIN_URL = 'https://login.yandex.ru/info'
# Авторизационные ключи ReCaptcha2
RECAPTCHA_PUBLIC_KEY = os.getenv('RECAPTCHA_PUBLIC_KEY')
RECAPTCHA_PRIVATE_KEY = os.getenv('RECAPTCHA_PRIVATE_KEY')
RECAPTCHA_PARAMETERS = {'hl': 'ru'}
RECAPTCHA_DATA_ATTRS = {'theme': 'dark', 'size': 'normal'}
# JSONIFY
JSONIFY_PRETTYPRINT_REGULAR = True
# Конфигурация screenshoter
SCREEN_SERVER = 'http://djap.fun/'
SCREEN_SERVER_SECRET_KEY = os.getenv('SCREEN_SERVER_SECRET_KEY')
SCREEN_URL_ROOT = 'img'
SCREEN_URL_FOLDER = 'screenshot'
UPLOAD_FOLDER = 'app/static/img/screenshot'
STORAGE_PATH = 'static/img/screenshot/'
# PROJECT_HOST = 'https://7cf41d427274.ngrok.io'
PROJECT_HOST = 'https://coralboat.online'