-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.default.py
More file actions
31 lines (25 loc) · 917 Bytes
/
config.default.py
File metadata and controls
31 lines (25 loc) · 917 Bytes
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
"""
Author: StackFocus
File: config.py
Purpose: config for the app
"""
from os import path
class BaseConfiguration(object):
# We disable CSRF because it interferes with logging in
# from anywhere but the form on the login page.
# We introduce very little risk by disabling this.
WTF_CSRF_ENABLED = False
# Make this random (used to generate session keys)
SECRET_KEY = '123456789abcdef123456789'
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:vagrant@localhost:3306/servermail'
basedir = path.abspath(path.dirname(__file__))
LOG_LOCATION = '/opt/postmaster/logs/postmaster.log'
class TestConfiguration(BaseConfiguration):
WTF_CSRF_ENABLED = False
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
DEBUG = True
LOG_LOCATION = ''
class DevConfiguration(BaseConfiguration):
WTF_CSRF_ENABLED = False
DEBUG = True