-
Notifications
You must be signed in to change notification settings - Fork 32
/
config.py.example
70 lines (52 loc) · 1.58 KB
/
config.py.example
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# flake8: noqa
import os
WTF_CSRF_ENABLED = False # On production, delete this line!
SECRET_KEY = ''
MAILGUN_API_KEY = os.getenv('MAILGUN_API_KEY')
MAILGUN_DOMAIN = os.getenv('MAILGUN_DOMAIN', 'mail.pythonic.guru')
SERVER_ADDRESS = os.getenv('SERVER_ADDRESS', '127.0.0.1:5000')
SITE_NAME = 'Learning Python'
# REGISTRATION CONFIGURATIONS
REGISTRATION_OPEN = True
CONFIRMATION_TIME = 3600
# MAIL CONFIGURATION
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USERNAME = 'username@gmail.com'
MAIL_PASSWORD = 'password'
MAIL_DEFAULT_SENDER = 'username@gmail.com'
DISABLE_MAIL = True # On production, change this value to False!
# ADMIN PANEL
FLASK_ADMIN_FLUID_LAYOUT = True
# SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_SAMESITE = 'Lax'
# REMEMBER_COOKIE_SECURE = True
REMEMBER_COOKIE_HTTPONLY = True
REMEMBER_COOKIE_SAMESITE = 'Lax'
FEATURE_FLAG_CHECK_IDENTICAL_CODE_ON = os.getenv(
'FEATURE_FLAG_CHECK_IDENTICAL_CODE_ON', False,
)
MAIL_WELCOME_MESSAGE = 'welcome-email'
USERS_CSV = 'users.csv'
ERRORS_CSV = 'errors.csv'
# Files limits sizes
MAX_UPLOAD_SIZE = 2_000_000 # 2MB (in bytes)
MAX_ZIP_CONTENT_SIZE = 5_000_000 # 5MB (in bytes)
# Shareable option
SHAREABLE_SOLUTIONS = True
# Users comments option
USERS_COMMENTS = True
# Babel config
LANGUAGES = {
'he': 'Hebrew',
'en': 'English',
}
LOCALE = 'en'
# Limiter settings
LIMITS_PER_MINUTE = 5
LIMITS_PER_HOUR = 50
# Change password settings
MAX_INVALID_PASSWORD_TRIES = 5
REPOSITORY_FOLDER = os.getenv("REPOSITORY_FOLDER", os.path.abspath(os.path.join(os.curdir, "repositories")))