-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
executable file
·42 lines (28 loc) · 1.52 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
import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config(object):
SERVER_NAME = os.environ.get('SERVER_NAME') or "localhost:5000"
SECRET_KEY = os.environ.get('SECRET_KEY') or "123456"
ENVIRONMENT_TYPE = os.environ.get('ENVIRONMENT_TYPE') or "DEBUG"
BACKUP_PATH = os.environ.get('BACKUP_PATH') or './'
WRITE_PATH = os.environ.get('WRITE_PATH') or './'
SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI') \
or 'sqlite:///' + os.path.join(WRITE_PATH, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
BLOG_ADMIN_USER = os.environ.get('BLOG_ADMIN_USER') or "olirowanxyz"
BLOG_ADMIN_ID = os.environ.get('BLOG_ADMIN_ID') or 1
MYSQL_DB_NAME = os.environ.get('MYSQL_DB_NAME')
MYSQL_BACKUP_USER = os.environ.get('MYSQL_BACKUP_USER')
MYSQL_BACKUP_PASS = os.environ.get('MYSQL_BACKUP_PASS')
ADMINS = ['[email protected]']
SENDGRID_API_KEY = os.environ.get('SENDGRID_API_KEY')
RECAPTCHA_PUBLIC_KEY = os.environ.get('RECAPTCHA_PUBLIC_KEY')
RECAPTCHA_PRIVATE_KEY = os.environ.get('RECAPTCHA_PRIVATE_KEY')
# SESSION_COOKIE_SECURE = os.environ.get('SESSION_COOKIE_SECURE') or True
# REMEMBER_COOKIE_SECURE = os.environ.get('REMEMBER_COOKIE_SECURE') or True
# SESSION_COOKIE_HTTPONLY = os.environ.get('SESSION_COOKIE_HTTPONLY') or True
# REMEMBER_COOKIE_HTTPONLY = os.environ.get('REMEMBER_COOKIE_HTTPONLY') or True
SITE_WIDTH = 800
POSTS_PER_PAGE = 5