forked from YummyELine/new-huge_project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
28 lines (20 loc) · 805 Bytes
/
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
#!/usr/bin/env python
# encoding:utf-8
import os
DEBUG = True
SECRET_KEY = os.urandom(24)
# 定义上传路径
UP_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "static/uploads/")
FC_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "static/uploads/users/")
# dialect+driver://username:password@host:port/database
DIALECT = 'mysql'
DRIVER = 'mysqlconnector'
USERNAME = 'root'
PASSWORD = 'Root03228396!'
HOST = '127.0.0.1'
PORT = '3306'
DATABASE = 'newhuge'
SQLALCHEMY_DATABASE_URI = "{}+{}://{}:{}@{}:{}/{}?charset=utf8".format(DIALECT, DRIVER, USERNAME,
PASSWORD, HOST, PORT, DATABASE)
UEDITOR_UPLOAD_PATH = os.path.join(os.path.dirname(__file__),'images')
SQLALCHEMY_TRACK_MODIFICATIONS = False