"""
The flask application package.
"""

import os
from flask import Flask
from config import Config
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
#from FlaskWebProject1 import routes
from FlaskWebProject1.models import Base

basedir = os.path.abspath(os.path.dirname(__file__))

class Config(object):
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SQLALCHEMY_DATABASE_URI = 'mssql+pyodbc://sa:Optimus0329@sqlalchemy_db'
    SQLALCHEMY_BINDS = {
        'django_db': 'mssql+pyodbc://sa:Optimus0329@django_db'
    }

app = Flask(__name__)
app.config.from_object(Config)
db = SQLAlchemy(app)
migrate = Migrate(app, db)
db.Model = Base
#db.create_all()

import FlaskWebProject1.views

