-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
63 lines (46 loc) · 1.41 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import os
# Copied to all configs
class DefaultConfig(object):
# Flask
DEBUG = False
Testing = False
# SQLAlchemy
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'site.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = 'e327924a6b8846030dbd537a6a33c7f0f2149593b50bc235016e022846915444'
# Flask mail
# Comment me out
MAIL_SERVER = 'ssl0.ovh.net'
MAIL_PORT = 465
MAIL_USERNAME = '[email protected]'
MAIL_PASSWORD = 'hIYcrp3Rxg61OwJ'
# click "allow less secure apps" in google for working
# MAIL_SERVER = 'smtp.gmail.com'
# MAIL_PORT = 465
# MAIL_USERNAME = '[email protected]'
# MAIL_PASSWORD = 'Laughing522'
MAIL_USE_TLS = False
MAIL_USE_SSL = True
# Check redirect links
# SAFE_URL_HOSTS = {'production-site.com'}
# Bcrypt?
SECURITY_PASSWORD_SALT = 'uhh!secret'
class DevelopmentConfig(DefaultConfig):
# Flask
DEBUG = True
# Check redirect links
SAFE_URL_HOSTS = {'127.0.0.1:5000'}
class ProductionConfig(DefaultConfig):
pass
class TestConfig(DefaultConfig):
# Flask
TESTING = True
# SQLAlchemy
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
MAIL_SERVER = ''
MAIL_PORT = 1
MAIL_USERNAME = ''
MAIL_PASSWORD = ''
# Check redirect links
SAFE_URL_HOSTS = {'127.0.0.1:5000'}