18 lines
453 B
Python
18 lines
453 B
Python
|
import yaml
|
||
|
from appservice import app
|
||
|
from models import *
|
||
|
from flask_script import Manager
|
||
|
from flask_migrate import Migrate, MigrateCommand
|
||
|
|
||
|
migrate = Migrate(app, db)
|
||
|
|
||
|
manager = Manager(app)
|
||
|
manager.add_command('db', MigrateCommand)
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
with open("config.yaml", "rb") as config_file:
|
||
|
config = yaml.load(config_file)
|
||
|
|
||
|
app.config['SQLALCHEMY_DATABASE_URI'] = config['SQLALCHEMY_DATABASE_URI']
|
||
|
manager.run()
|