24 lines
675 B
Python
24 lines
675 B
Python
from flask import Flask
|
|
# from flask_login import LoginManager
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
|
|
UPLOAD_FOLDER = 'app/static/uploads/'
|
|
|
|
app = Flask(__name__)
|
|
app.secret_key = 'secret key'
|
|
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
|
|
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024
|
|
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////db/db.sqlite3'
|
|
# app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://user:password@sql/ece3553'
|
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
|
|
|
# login_manager = LoginManager(app)
|
|
|
|
db = SQLAlchemy(app)
|
|
|
|
from app import views
|
|
from app import admin_views
|
|
from app import tables
|
|
|
|
with app.app_context():
|
|
db.create_all()
|