Commit b472902a authored by Willard's avatar Willard

Move config to separate object

parent 85aa2eff
...@@ -5,11 +5,7 @@ from flask_migrate import Migrate ...@@ -5,11 +5,7 @@ from flask_migrate import Migrate
from flask_login import LoginManager from flask_login import LoginManager
app = Flask(__name__) app = Flask(__name__)
app.config.from_object('canteeneo.config.BaseConfig')
app.config['SECRET_KEY'] = 'canteeneo_key'
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:therootisdead@localhost/canteeneo'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['UPLOAD_FOLDER'] = os.path.realpath('.\\canteeneo\\static\uploads')
login_manager = LoginManager() login_manager = LoginManager()
login_manager.init_app(app) login_manager.init_app(app)
......
import os.path
class BaseConfig(object):
DEBUG=True
SECRET_KEY = 'canteeneo_key'
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:therootisdead@localhost/canteeneo'
SQLALCHEMY_TRACK_MODIFICATIONS = False
UPLOAD_FOLDER = os.path.realpath('.\\canteeneo\\static\uploads')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment