-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
48 lines (36 loc) · 1.16 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
import os
'''
Configuration settings to be used on localhost.
'''
class DevelopmentConfig:
# SERVER RELOAD ON CODE CHANGE
DEBUG = True
TEMPLATES_AUTO_RELOAD = True
# MySQL setup
MYSQL_DATABASE_USER = os.environ['DB_USER']
MYSQL_DATABASE_PASSWORD = os.environ['DB_PASS']
MYSQL_DATABASE_DB = os.environ.get('DB')
MYSQL_DATABASE_HOST = os.environ.get('DB_HOST')
# FLASK-MAIL SETUP
MAIL_SERVER = os.environ.get('MAIL_SERVER')
MAIL_PORT = os.environ.get('MAIL_PORT')
MAIL_USE_SSL = True
MAIL_USERNAME = os.environ.get('MAIL_USER')
MAIL_PASSWORD = os.environ.get('MAIL_PASS')
'''
Configuration settings to be used on PythonAnywhere.
'''
class ProductionConfig:
# SERVER RELOAD ON CODE CHANGE
DEBUG = False
# MySQL setup
MYSQL_DATABASE_USER = os.environ['DB_USER']
MYSQL_DATABASE_PASSWORD = os.environ['DB_PASS']
MYSQL_DATABASE_DB = 'niledb' # CHANGE TO PA DB
MYSQL_DATABASE_HOST = 'localhost' # CHANGE TO PA DB URL
# FLASK-MAIL SETUP
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 465
MAIL_USE_SSL = True
MAIL_USERNAME = '[email protected]'
MAIL_PASSWORD = 'Testing1'